Skip to content

Commit 0af108d

Browse files
SwayZeeeyangshun
andauthored
contents(queue): fix typo in queue content (#609)
Co-authored-by: Yangshun Tay <[email protected]>
1 parent 02a2444 commit 0af108d

File tree

1 file changed

+1
-1
lines changed
  • apps/website/contents/algorithms

1 file changed

+1
-1
lines changed

apps/website/contents/algorithms/queue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Breadth-first search is commonly implemented using queues.
5555

5656
## Things to look out for during interviews
5757

58-
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.
58+
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.
5959

6060
## Corner cases
6161

0 commit comments

Comments
 (0)