How can we insert an item into an array efficiently?
Sometimes we have to insert items to the first indices of the array
The easiest solution can be:
var array = [1,2,3,4,5,6,7,8,9]
array.insert(0, at: 0)
print(array)
this solution is going to work, but is it efficient?
Looking into the Apple Doc...
ahmedelgendy.com1 min read