Algorithm · Amazon · Medium
Implement a function that receives an integer array nums and returns its mode values. A value qualifies as a mode when its frequency equals the maximum frequency in the array, but only if that maximum frequency is at least 2. Return every qualifying value in the order in which it first appears in nums. If several values share the highest frequency, include all of them. If nums is empty or every value appears exactly once, return an empty list. The base implementation must…
Checking your access…