The algorithm or technique used, the time complexity, the auxiliary space, and the optimality are given as comments at the top of each file. Optimality always favors time.
Built-in sorting algorithms from standard libraries are considered to require
Arrays.sort()
's
dual-pivot quicksort
and Python's list.sort()
's
powersort
actually need
Note
Binary logarithms, as in
logarithmic time,
are notated lb n
) in compliance with
ISO 80000-2:2019.
- 1. Two Sum
- 49. Group Anagrams
- 217. Contains Duplicate
- 242. Valid Anagram
- Write solutions in C