1313. Decompress Run-Length Encoded List
On This Page
class Solution:
def decompressRLElist(self, nums: List[int]) -> List[int]:
res = []
for i in range(1, len(nums), 2):
res.extend([nums[i]] * nums[i - 1])
return res