News for hackers. Stuff that matters.
Re:The use of ‘class’ for things that should be simple free ... by mvgoogler on Sunday May 29, 2022 @12:50PM (#31550570)
I would ask the interviewer and use it as an opportunity to show your knowledge of data structures and your ability to reason about trade-offs and talk through priorities.

I would say something like: "I think a balanced tree, such as an rb-tree, would be useful here for <reasons that make sense given the problem and the properties of rb trees>. I've written rb trees before and think I could write a basic one in 10-15 minutes or I could use <class from the std library, which uses a balanced tree>. Which would you prefer?"

Assuming what you said made sense I would take an interaction like that as a positive signal.

There are no comments on this comment yet.