Introduction
It is easy level tree algorithm. I worked on the algorithm and try to choose O(N) time complexity algorithm, by visiting all the nodes in the tree once. I ended up to spend over 30 minutes and then the code has multiple bugs and a few test cases failed.
I like to document my learning on the tree level algorithm and encourage myself to practice more on easy level algorithms.
My practice
Here is my C# code with multiple failed test cases.
No comments:
Post a Comment