LeetCode 900: RLE Iterator
Problem Restatement We need to design an iterator over a run-length encoded sequence. The encoded array stores pairs: [count, value] At every even index i , encoding[i] is the number of times encoding[i + 1] appears in the decoded sequence. For example: encoding = [3, 8, 0, 9, 2, 5] represents: [8, 8, 8, 5, 5] because there are three 8 s, zero 9 s, and two 5 s. The...