private boolean isCharRepeated(char previousChar, char currentChar) {
    return currentChar == previousChar;
  }
Time complexity O(n) Space complexity O(n)
First while loop for finding repeat groups, and inner while loop is for finding same characters
src/main/java/com/github/pedrovgs/problem53/CompressString.java