Skip to main content

3 docs tagged with "arrays"

View all tags

Experiments

Explore how JavaScript handles attempts to index an array using floating-point numbers, highlighting the importance of integer indices for expected behavior.

Prefix Sums

Prefix sums (cumulative sums) are a foundational technique for speeding up range queries. They extend beyond arrays into matrices, trees, and even XOR or product computations, forming the backbone of many algorithmic optimizations.

Why Heaps Are Often Implemented as Arrays

Heaps are binary trees, so why aren't they stored like one? Discover why arrays are the perfect data structure for implementing heaps — and how heaps work in the first place.