contents(queue): fix typo in queue content (#609)

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
pull/611/head
SwayZeee 1 year ago committed by GitHub
parent 02a2444892
commit 0af108d24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,7 +55,7 @@ Breadth-first search is commonly implemented using queues.
## Things to look out for during interviews
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. In such cases, you can flag this to the interviewer and say that you assume that there's a queue data structure to use which has an efficient enqueue operation.
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 dequeue operation (assuming the front of the queue is on the left) in such a scenario will be O(n) because it requires shifting of all other elements left by one. In such cases, you can flag this to the interviewer and say that you assume that there's a queue data structure to use which has an efficient dequeue operation.
## Corner cases

Loading…
Cancel
Save