Tree: Depth-First Search - Path Sum II (All Root-to-Leaf Paths)
What is the space complexity of the recursive backtracking solution for Path Sum II in terms of recursion stack and output storage, given N nodes, path length L, and K valid paths?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions