1.1 Arrays and Dynamic Arrays
Fixed and dynamic arrays, resizing strategies, memory layout, cache effects, vectorization, and in-place operations.
1.1 Arrays and dynamic arrays, 35
| index | slug | name |
|---|---|---|
| 1 | static-array | Static Array |
| 2 | dynamic-array | Dynamic Array |
| 3 | vector-resize-strategy | Resize Strategy |
| 4 | circular-array | Circular Array |
| 5 | multidimensional-array | Multidimensional Array |
| 6 | jagged-array | Jagged Array |
| 7 | array-slicing | Array Slicing |
| 8 | array-rotation | Array Rotation |
| 9 | prefix-sum-array | Prefix Sum Array |
| 10 | difference-array | Difference Array |
| 11 | sliding-window-array | Sliding Window |
| 12 | sparse-array | Sparse Array |
| 13 | bit-packed-array | Bit Packed Array |
| 14 | dynamic-reserve | Capacity Reservation |
| 15 | amortized-analysis-array | Amortized Analysis |
| 16 | array-partition | Partitioning |
| 17 | array-stable-partition | Stable Partition |
| 18 | array-reversal | Reversal |
| 19 | array-shuffle | Shuffle |
| 20 | array-scan | Linear Scan |
| 21 | array-compaction | Compaction |
| 22 | array-deduplication | Deduplication |
| 23 | array-merge | Merge |
| 24 | array-intersection | Intersection |
| 25 | array-union | Union |
| 26 | array-binary-layout | Memory Layout |
| 27 | array-copying | Copy Strategies |
| 28 | array-buffering | Buffering |
| 29 | array-index-mapping | Index Mapping |
| 30 | array-bounds-check | Bounds Checking |
| 31 | array-stride-access | Stride Access |
| 32 | array-blocking | Blocking |
| 33 | array-tiling | Tiling |
| 34 | array-vectorization | Vectorization |
| 35 | array-alignment | Alignment |
Static Array
Store a fixed number of elements in contiguous memory with constant-time indexing.
Dynamic Array
Resizable array that grows and shrinks automatically while preserving contiguous storage.
Circular Array
Array that wraps indices modulo capacity to support efficient cyclic access.
Multidimensional Array
Store values indexed by two or more dimensions using a linear memory layout.
Jagged Array
Store rows of different lengths as an array of arrays.
Array Slicing
Represent a contiguous subrange of an array as either a view or a copied array.
Array Rotation
Rotate elements of an array by a given offset in-place or using auxiliary space.
Prefix Sum Array
Precompute cumulative sums to answer range sum queries in constant time.
Difference Array
Represent range updates compactly by storing changes between adjacent values.
Sliding Window Array
Maintain a contiguous window over an array while moving its left and right boundaries.
Sparse Array
Store only non-default values from a large logical array.
Bit-Packed Array
Store small integers or booleans using compact bit-level representation.
Capacity Reservation
Preallocate array capacity to reduce reallocations and copying during growth.
Amortized Analysis
Analyze the average cost per operation over a sequence of dynamic array operations.
Array Partition
Rearrange elements so that those satisfying a predicate appear before others.
Stable Partition
Partition an array while preserving the relative order of elements inside each group.
Array Reversal
Reverse the order of elements in an array in-place using symmetric swaps.
Array Shuffle
Generate a uniform random permutation of an array in-place.
Array Scan
Traverse an array sequentially to compute an aggregate or apply a function.
Array Compaction
Remove elements in-place based on a predicate while preserving the remaining elements.
Array Deduplication
Remove duplicate values from an array while keeping one representative of each value.
Array Merge
Merge two sorted arrays into a single sorted array.
Array Intersection
Compute the common elements between two arrays.
Array Union
Combine elements from two arrays into one collection without duplicates.
Memory Layout
Understand how arrays are stored in memory and how layout affects performance.
Array Copying
Copy array elements into a new storage block using shallow or deep copy semantics.
Array Buffering
Use temporary array storage to stage data before writing it to its final location.
Index Mapping
Map logical array positions to physical storage positions.
Bounds Checking
Validate array indices before access to prevent invalid reads and writes.
Stride Access
Access array elements at regular intervals and understand the effect on locality.
Blocking
Process an array in fixed-size blocks to improve cache locality and batch behavior.
Tiling
Process multidimensional arrays in small rectangular regions to improve locality.
Vectorization
Process multiple array elements per instruction using SIMD-friendly layout and loops.