solutions/The Last Algorithms Course .../2. Arrays Data Structure.md

18 lines
244 B
Markdown
Raw Permalink Normal View History

2024-04-21 15:05:40 -04:00
array [0][]
a + width * offset
contigious memory
```
int a[3];
[ jakdf ] [ adsfa ] [ vdsfv ]
a[1] = 4;
[ jakdf ] [ 4 ] [ vdsfv ]
```
O(1) operations, do not grow by input, we know all the positions and variables, so we just multiply