Introduction
It was busy day on Sept. 27, and I had a mock interview at 10:00 pm on recursive function. My issue is how to analyze the time complexity.
Algorithm Practice
C# practice is here.
If all keys in the dictionary are put into a tree, and all the nodes will be visited once using depth first search. So the time complexity should be the size of the tree. Recursive function is used, so no need to extra space to store all the nodes.
No comments:
Post a Comment