```
+---------+--------+----------+
Stack | pointer | length | capacity |
- | | | 3 | 5 |
- +----|----+--------+----------+
- |
- |
- v
+ | | | 3 | 5 |
+ +--| ----+--------+----------+
+ |
+ |
+ v
+---+---+---+---+---+
Heap: | H | e | y | ? | ? |
+---+---+---+---+---+
```
--------------------------------------
- | |
+ | |
+----v----+--------+----------+ +----|----+
Stack | pointer | length | capacity | | pointer |
- | | | 3 | 5 | | |
- +----|----+--------+----------+ +---------+
- | s r
- |
- v
+ | | | 3 | 5 | | |
+ +--| ----+--------+----------+ +---------+
+ | s r
+ |
+ v
+---+---+---+---+---+
Heap | H | e | y | ? | ? |
+---+---+---+---+---+