Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue cheatsheet for coding interviews may need to be updated. #602

Open
ElliottLarsen opened this issue Sep 4, 2023 · 0 comments
Open

Comments

@ElliottLarsen
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant