DynamicArray

Type Alias DynamicArray 

Source
pub type DynamicArray<T> = Vec<T>;
Expand description

Dynamic array with contiguous memory layout

Complexity:

  • Access: O(1) by index
  • Push: O(1) amortized (doubles capacity on realloc)
  • Insert/Remove: O(n) for arbitrary position

Memory: ptr + len + capacity (24 bytes on 64-bit) Growth strategy: Geometric progression (2x) for amortized O(1)

Aliased Type§

pub struct DynamicArray<T> { /* private fields */ }

Trait Implementations§

Source§

impl<T> IntoIteratorWithHint for DynamicArray<T>

Source§

fn size_hint_before(&self) -> (usize, Option<usize>)

Get size hint before consuming