Algorithm · Waymo · Easy
You receive an integer array nums with n elements, where each element fits in an unsigned 16-bit integer, meaning $$0 \le nums[i] < 2^{16}$$. Tally how many times each value appears, considering only values that actually occur in the array, and report each value together with its count, ordered from the smallest value to the largest. Rules for this task: a hash table may not be used. You are allowed to rely on the fact that the set of possible values is fixed and its maximum…