Skip to main content

New Page

OperationBig-ONote
AccessO(1) 
SearchO(n) 
Search (sorted array)O(log(n)) 
InsertO(n)Insertion would require shifting all the subsequent elements to the right by one and that takes O(n)
Insert (at the end)O(1)Special case of insertion where no other element needs to be shifted
RemoveO(n)Removal would require shifting all the subsequent elements to the left by one and that takes O(n)
Remove (at the end)O(1)Special case of removal where no other element needs to be