yangshun / tech-interview-handbook

💯 Curated coding interview preparation materials for busy software engineers

Home Page:https://www.techinterviewhandbook.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Queue cheatsheet for coding interviews may need to be updated.

ElliottLarsen opened this issue · comments

Under Things to look out for during interviews it says the following:

"Most languages don't have a built-in Queue class which can be used, and candidates often use arrays (JavaScript) or lists (Python) as a queue. However, note that the enqueue operation in such a scenario will be O(n) because it requires shifting of all other elements by one..."

Shouldn't it say dequeue operation instead since removing elements from the beginning of a list() in Python, for example, will require other elements to be shifted down a step?