Andy
BAN USER
Comments (18)
Reputation 130
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
1
of 1 vote
The answers above are flawed in that not all recursive calls return value.
Here is my answer to the question. I think that this is the correct one. The time complexity of my approach is O(k).
basicalgos.blogspot.com/2012/03/23-find-kth-node-in-binary-search-tree.html
Comments are welcome!
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
I am surprised to see comments like this here. Why we cannot post link here? I put the answers in my blog for two purposes: first, it will be helpful for me to review the problems that I solved before; second, it has syntax highlighter and it is easier to read than read it on careercup.
- Andy April 17, 2012