1/31/2024
RLEIterator - 2nd attempt
This is my second attempt at solving the RLEIterator problem.
Basically, what it does is to translate the encoding array it received from the constructor into the private arr of objects that has num and count property.
In the next function, the for loop will go over the arr, consider each item to see if the iterator exceeds the item yet. If it does not, go to the next iteration, otherwise, update the item.count, put it back to the array.