From 769fe4d9fe52b47f86cf36579385359b311d9fc9 Mon Sep 17 00:00:00 2001 From: Brian Obot Date: Sat, 7 Mar 2026 15:30:03 +0100 Subject: [PATCH] Update methods in collections --- src/bin/44_collections.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/bin/44_collections.rs b/src/bin/44_collections.rs index 7c55655..b0473fc 100644 --- a/src/bin/44_collections.rs +++ b/src/bin/44_collections.rs @@ -85,4 +85,18 @@ fn main() { // Random elements // .choose(&mut rng) // .shuffle(&mut rng) + // + // VecDeque: Allow for efficiently adding and removing elements from the front and end of the vector + // .push_front(value) + // .push_back(value) + // .pop_front() + // .pop_back() + // .front(), .back() : similar to first and last in normal Vectors + // .front_mut(), back_mut(): similar to first_mut and last_mut for normal vectors + // + // you can convert to and from vecdeque to normal vectors using the following methods + // Vec::from(deque) + // VecDeque::from(vec) + + // BinaryHeap }