ArrayList in UNSAFE Rust 🦀! - Rust DSA v2 (part 5)
Vložit
- čas přidán 27. 08. 2024
- We implement an Array List in Rust! An Array List is just like a Vec (from Rust's stdlib). The basic implementation goes quickly so we also implement a consuming iterator, Index/IndexMut traits, and push_front (an inefficient way of adding an element).
Note: The ArrayList on stream is a little different than the final implementation on the github due to a few UB and memory leak issues with the drop implementation (or lack thereof) and the Iterator impl. The fixes for those will actually be covered in a short addendum to this video!
My article on ArrayList: metame.substac...
Github: github.com/met...
Previous episodes:
Linear & Binary Search: • Linear & Binary Search...
Singly Linked List: • Singly Linked List in ...
Doubly Linked List: • Doubly Linked List in ...
RawVec: • Growable Memory Buffer...
Follow along as we implement data structures and algorithms in Rust!
Watch live at / metameeee
/ metameeee - Věda a technologie
Great