Hacker News new | ask | show | jobs
by foo101 3160 days ago
Is coding a BST and traversing it that big a deal?

I routinely code tree traversals at my work, so my judgement may be clouded here, so I am genuinely curious here to know if most people here think that it is unreasonable to expect someone to code a BST from scratch.

In my opinion, BSTs are one of the easier things in programming, with a complexity that is maybe only a little above a for-loop. Most often, in real world, the more complex stuff happens in the business logic, or API contracts, or that sort of thing outside tree traversals.

1 comments

Yes, I think you're lucky to be in a somewhat unusual position that let's you regularly work with problems like that.

I'm merely a junior level developer working on database engines. Most of my day-to-day involves maintenance of decades old code where the 'hard problems' have long been solved. I imagine my codebase ancestors might have needed thorough knowledge of trees at some point :)