Subtopic 2.1
Array Operations
10lessons48 min0done
This subtopic covers the basic operations on an array, one lesson each. The capacity of the array is fixed; a separate size variable keeps the length of the filled part.
The lessons follow the same order as the linked list operations. Each lesson links to its linked list twin, so you can see why an operation that is O(n) on an array is O(1) on a linked list, or the other way round.
- 2.1.1Creating an array5 min
- 2.1.2Traversing an array4 min
- 2.1.3Inserting at the end4 min
- 2.1.4Inserting at a position6 min
- 2.1.5Inserting at the front5 min
- 2.1.6Deleting from the end4 min
- 2.1.7Deleting from the front5 min
- 2.1.8Deleting from the middle6 min
- 2.1.9Searching for a value4 min
- 2.1.10Reversing an array5 min