July 3, 2015
Went through the first 10 questions from the blogs:
Stumble on most questions:
Need to practice this question using C#, excellent question. Do not think clearly about height calculation, left side height vs right side height, which is the complete the tree.
Another one,
how to come out the best solution? Naive solution is O(N^2), start point and end point, each has n choices; so, let us try O(n) solution. Go through one loop, maybe multiple times. How many variables, ...stumble on easy question.
And then, how to extend the problem: if the start point can connect end point, like a ring. Stumble on this problem, so, take easy step, first, ask myself, what is the case no ring? And then, what is connection between two of them. Clever solution.
Topological order learning:
First time read it about this ordering - topological order
One comment is that she needs to go through quick learning through problems, 10 problems a time; pick up something, like a hint, and then, know how to expand her knowledge.
No comments:
Post a Comment