Goal: Build your own static array class and understand how low-level array operations work.
StaticArray
class with constructor to initialize fixed sizepush(value)
โ add to the end (if space)pop()
โ remove from endget(index)
โ return value at indexset(index, value)
โ overwrite value at indexdelete(index)
โ remove at index, shift elements leftinsert(index, value)
โ insert at index, shift elements rightGoal: Understand how sorted arrays maintain order and allow efficient search.
SortedArray
class with fixed capacityinsert(value)
โ insert while maintaining sort order (use shifting)