Tell me about smart pointers and deadlock in embedded software.
Given a directed dependency graph of n components, each component either owns another component through a smart pointer or waits on a lock held by another component. Return true if the dependency graph contains a cycle that can lead to deadlock, otherwise return false.
n: number of components, labeled 0 to n - 1edges: list of directed pairs [u, v], meaning component u depends on component vdef has_deadlock_cycle(n, edges):