BST AlternatingCharacters HackerRank