Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Spencer Lan
TreeSet?

Spencer Lan

Jan 5, 2026

Am I wrong or does the code not utilize a TreeSet or Tree structure at all?

1

0

Comments
Comments
S
singhursefamily 2 days ago

I have the same question. The JavaScript implementation uses an array, and the add and find methods would be O(N) rather than O(log N).