Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
throwaway307349
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
throwaway307349
7y ago
It’s an easy question if you just do an inorder traversal and stop at the kth element, but of course that’s not optimal. To get log(n) efficiency you need to augment the tree with subtree counts.
2.
▲
by
throwaway307349
7y ago
The worst is when the spec seems purposely vague (which is a reasonable part of the challenge), but there’s no channel provided to ask clarifying questions. CockroachDB was like this.