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?
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?