A run-length encoded list is given as nums where for each pair (freq, val) at indices [2i, 2i+1], the value val should appear freq times in the decompressed list. Return the decompressed list.
Input: An integer array nums of even length where pairs represent (frequency, value).
Output: Decompressed integer array.
Input: [1,2,3,4]
Output: [2,4,4,4]
Explanation: Pair (1,2): one 2 → [2]. Pair (3,4): three 4s → [4,4,4]. Combined: [2,4,4,4].Input: [1,1,2,3]
Output: [1,3,3]
Explanation: Pair (1,1): one 1 → [1]. Pair (2,3): two 3s → [3,3]. Combined: [1,3,3].Input: [2,4,3,1,2,2]
Output: [4,4,1,1,1,2,2]
Explanation: Pair (2,4): [4,4]. Pair (3,1): [1,1,1]. Pair (2,2): [2,2]. Combined: [4,4,1,1,1,2,2].2 <= nums.length <= 1000nums.length is even1 <= nums[i] <= 1000