Design Compressed String Iterator - C++ Solution @ LeetCode
Design Compressed String Iterator, is a LeetCode problem. In this post we will see how we can solve this challenge in C++
Design and implement a data structure for a compressed string iterator. It should support the following operations: next and hasNext.
The given compressed string will be in the form of each letter followed by a positive integer representing the number of this letter existing in the original uncompressed string.
next() - if the original string still has uncompressed characters, return the nex ....
You can find the full details of the problem Design Compressed String Iterator at LeetCode
Solution: Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @kamyu104