Skip to content

Files

Latest commit

 

History

History

Arrays

Deletion in a vector takes O(1) time if order doesn't matter. Delete ith indexed value.

swap(arr[i], arr[n-1]);
arr.pop_back();