This question evaluates algorithm design and analysis skills—particularly time–space tradeoffs, frequency counting techniques (sorting, hashing, and counting arrays), and handling streaming or memory-constrained inputs in the Coding & Algorithms domain.

For an unsorted array of integers, implement two functions: (