Problem 1: Find Consecutive Ones(https://leetcode.com/problems/max-consecutive-ones-iii/)
Given a string we have to remove all the continuous character whose count is more than 2. For example :
- abba ----> abba
- abbb---->a is the output because c count is 3.
- abbbaa---> '' empty string
- abbacccaa--->abbHere relative order of characters and their counts must be maintained so we figured out that we cannot use hashtable. Give a solution better than O(n^2).