2026-08-14 18:37:13 -04:00
|
|
|
---
|
2026-08-16 13:09:24 -04:00
|
|
|
title: 'Arrays and Strings'
|
2026-08-14 18:37:13 -04:00
|
|
|
description: 'O(1) index access, order is information.'
|
|
|
|
|
sidebar:
|
2026-08-16 13:09:24 -04:00
|
|
|
icon: play
|
|
|
|
|
label: Overview
|
2026-08-14 18:37:13 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
:::warning[Under construction]
|
|
|
|
|
This page is a scaffold. Notes, canonical problems, and template code are not written yet.
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
|
|
## Patterns
|
|
|
|
|
|
|
|
|
|
- [Two Pointers](/guides/coding/contiguous-linear/two-pointers) — Converging/parallel index walk that prunes the O(n^2) pair space using order.
|
|
|
|
|
- [Sliding Window](/guides/coding/contiguous-linear/sliding-window) — Two pointers plus incremental state between them.
|
|
|
|
|
- [Prefix Sum](/guides/coding/contiguous-linear/prefix-sum) — Precomputed cumulative state for O(1) range queries.
|
|
|
|
|
- [Binary Search](/guides/coding/contiguous-linear/binary-search) — Halving over any monotonic predicate, not just sorted arrays.
|
|
|
|
|
- [Matrices](/guides/coding/contiguous-linear/matrices) — 2D index arithmetic; often a graph in disguise.
|
|
|
|
|
|
|
|
|
|
**Systems anchor:** Prefix sum is a materialized view; sliding window is stream processing with an eviction policy.
|