##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Dynamic, flexible views into arrays
Welcome to slices
The concept
Basic syntax
Direct initialization
Test your knowledge
Allocating slices
len() and cap()
Test your knowledge
Creating slices from arrays
Omitting indices
Reslicing
Test your knowledge
Understanding references
Adding elements
Growth behavior
Test your knowledge
Combining slices
Copying elements
When to use each
Test your knowledge
Two kinds of emptiness
Slice parameters
A common gotcha
Test your knowledge
Delete patterns
Unordered deletion
Adding in the middle
Test your knowledge
Selecting elements
Slices of slices
Variable row lengths
Test your knowledge
Under the hood
Pre-allocation
Resetting without allocation
Test your knowledge
Gotchas to avoid
Push and pop
Enqueue and dequeue
Test your knowledge
Looking ahead
Key takeaways