From 5785ad98faf3419b6942fe44f31b38379eb2189b Mon Sep 17 00:00:00 2001 From: Pavel Date: Sat, 17 Feb 2024 15:03:05 -0800 Subject: [PATCH] Update python library queue -> deque Queue is designed for synchronous communication between threads, e.g. `get()` is a blocking call. The most appropriate class in Python for both stack and queue would be `deque` --- apps/website/contents/algorithms/queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website/contents/algorithms/queue.md b/apps/website/contents/algorithms/queue.md index 7341992f..cb1df981 100644 --- a/apps/website/contents/algorithms/queue.md +++ b/apps/website/contents/algorithms/queue.md @@ -40,7 +40,7 @@ Breadth-first search is commonly implemented using queues. | --- | --- | | C++ | [`std::queue`](https://docs.microsoft.com/en-us/cpp/standard-library/queue-class) | | Java | [`java.util.Queue`](https://docs.oracle.com/javase/10/docs/api/java/util/Queue.html).Use [`java.util.ArrayDeque`](https://docs.oracle.com/javase/10/docs/api/java/util/ArrayDeque.html) | -| Python | [`queue`](https://docs.python.org/3/library/queue.html) | +| Python | [`deque`](https://docs.python.org/3/library/collections.html#collections.deque) | | JavaScript | N/A | ## Time complexity