Worst case time-complexity is O(1) Time-complexity is O(1) because we are accessing the first and last value from the lists by an index.
Worst case time-complexity is O(n) Time-complexity is O(n) because we are accessing all the values in the list
Worst case time-complexity is O(N^2) Time-complexity is O(N^2) because of nesting in operator
Worst case time-complexity is O(logN) Time-complexity is O(logN) because of sorting
Worst case time-complexity is O(logN) Time-complexity is O(logN) because of sorting