diff --git a/apps/docs/public/hash-table-operations.svg b/apps/docs/public/hash-table-operations.svg new file mode 100644 index 0000000..3823419 --- /dev/null +++ b/apps/docs/public/hash-table-operations.svg @@ -0,0 +1,48 @@ + + + + + Hash Table: Three Core Operations (All O(1)) + + + + INSERT + + map["Alice"] = + "555-1234" + + 1. Hash "Alice" + 2. Compute index + 3. Store at index + + O(1) + + + + LOOKUP + + value = + map["Alice"] + + 1. Hash "Alice" + 2. Compute index + 3. Read from index + + O(1) + + + + DELETE + + delete + map["Alice"] + + 1. Hash "Alice" + 2. Compute index + 3. Remove from index + + O(1) + + + All operations complete in constant time (on average) + diff --git a/apps/docs/public/prefix-sum_1.png b/apps/docs/public/prefix-sum_1.png new file mode 100644 index 0000000..93318cd Binary files /dev/null and b/apps/docs/public/prefix-sum_1.png differ diff --git a/apps/docs/redirects.ts b/apps/docs/redirects.ts index 791cea4..b587e9b 100644 --- a/apps/docs/redirects.ts +++ b/apps/docs/redirects.ts @@ -76,6 +76,7 @@ export default [ { from: "/853", to: "/monotonic-stack/car-fleet" }, { from: "/875", to: "/binary-search/koko-eating-bananas" }, { from: "/973", to: "/heap-priority-queue/k-closest-points-to-origin" }, + { from: "/974", to: "/prefix-sum/subarray-sums-divisible-by-k" }, { from: "/977", to: "/two-pointers/squares-of-a-sorted-array" }, { from: "/994", to: "/graph-bfs/rotting-oranges" }, { from: "/1143", to: "/multi-d-grid-dp/longest-common-subsequence" },