Coding Interview Prep > Array > Flashcards
Time complexity
Access by index - o(1)Search - (n) Add in the end - o(1)Add at any location - O(n)
Techniques
Array Sort in ascending order
Arrays.sort( T[])
Arrays.sort(T[], Collections.reverseOrder())