6 ms·
I've been leetcoding recently and I feel like most leetcode problems have similar requirements to what you describe vis a vis data structures. I've been focusin
by ALittleLight 6y ago
I've been leetcoding recently and I feel like most leetcode problems have similar requirements to what you describe vis a vis data structures. I've been focusing on Medium difficulty, maybe it's different on hard, but I've been doing the occasional hard too and not noticed it. The problems mostly seem to be about realizing what algorithm you'll need and implementing it.
I actually solved a problem recently that I thought would require a QuadTree, and after implementing one and solving the problem I was proud of myself until I looked at the other solutions and realized I didn't need a QuadTree at all. In my notes I recorded the problem as a likely fail, because if I were the interviewer I'd take unnecessary complexity as a red flag. Part of me, I think, just wanted the chance to implement a QuadTree.