3 ms·
> Which is why all the LeetCode interviews always struck me as odd 90% of leetcode is choosing the right data structure. If your algorithm doesn’t wanna come t
by Swizec 3y ago
> Which is why all the LeetCode interviews always struck me as odd
90% of leetcode is choosing the right data structure. If your algorithm doesn’t wanna come together, you probably missed a better way to model the data.
- danielmarkbruce 3y agoI had a checklist one time for interviews. One of the items was: "consider data structures x, y, z" - only maybe 4 or 5 data structures. It worked 95% of the time.
- hdlothia 3y agoWhich data structures were those?
- danielmarkbruce 3y agoOh, I don't have the list I used to use, but it was very basic stuff. hash table, stack, queue, linked list, sorted array, binary tree, graph. Many problems seemed difficult until I just considered shoving the data into one of those.