Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/bin/44_collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oga look into this, improve this

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have, thank you

// .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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does nto look good please update

//
// you can convert to and from vecdeque to normal vectors using the following methods
// Vec::from(deque)
// VecDeque::from(vec)

// BinaryHeap
}