Problem statement: You are given a k-ary tree with parent array such that gives the parent of node and is the total nodes in the tree. What is the time and space complexity of finding the depth of the tree?
Solution 1 and Solution 2 are available with complexity. Solution 3 gives algorithm.
Solution 1 and Solution 2 are available with complexity. Solution 3 gives algorithm.
can u plz post the solution for this
ReplyDelete