> For the complete documentation index, see [llms.txt](https://docs.ramsdenj.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ramsdenj.com/introduction-4/notes.md).

# DSA

## Subarrays

It's possible to get number of subarrays ENDING at a fixed location, starting from a non fixed location:

```
[0, 1, 2, 3]
```

Subarrays ending at `i=3`, starting `i=1`

There are `1,2,3`, `2,3`, `3` - 3 total.

Compute via `end - start + 1`
