'Two Characters 해커랭크' 알고리즘 문제의 요구사항을 분석하고 최적의 자료구조와 연산 방식을 적용해 구현한 풀이다.
2차원 배열로 접근할 수 있다.
문제 : 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