contents: grammar / consistency fixes for algo sites (#599)

This commit is contained in:
Michael Sparre
2023-08-02 17:25:53 -07:00
committed by GitHub
parent 2666344b36
commit 9dbec74a21
7 changed files with 22 additions and 22 deletions

View File

@@ -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 to 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 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.
## Corner cases