Search⌘ K
AI Features

Sort Array by Increasing Frequency

Explore how to sort arrays by increasing frequency of elements and decreasing values for ties. Understand the problem, practice coding solutions, and apply tracking techniques useful in coding interviews.

Statement

Given an array of integers nums, sort the array in increasing order based on the frequency of each value. If multiple values share the same frequency, sort those values in decreasing order.

Return the sorted array.

Constraints:

  • 11 \leq ...