String Compression Leetcode Problem