[자바JAVA]Two Characters 해커랭크
문제 : Two Characters
주어진 String의 요소 2가지만을 추출하여 String을 만들때 가장 길이가 긴 String의 길이값을 리턴하는 문제이다.
Given a string, remove characters until the string is made up of any two alternating characters. When you choose a character to remove, all instances of that character must be removed. Determine the longest string possible that contains just two alternating letters