3 ms·
Whoops. Correction: a Python list is a very bad queue.
by pmiller2 7y ago
Whoops. Correction: a Python list is a very bad queue.
- christiansakai 7y agoYeah, but for the purpose of algorithm interview it doesn't matter.
- pmiller2 7y agoIt does if your interviewer knows that popping from the head of a list is O(n) and they feel like being picky about it.
- Apocryphon 7y agoIt's usually forgiven if you mention that you know that specific language idiosyncrasy and they'll handwave it for the purposes of the interview. If they don't, then that's what knowing alternatives is for.