You are given an array of characters letters that is sorted in non-decreasing order, and a character target. There are at least two different characters in letters.
Return the smallest character in letters that is lexicographically greater than target. If such a character does not exist, return the first character in letters (circular).
Example 1:
Input: c f j Target: a Output: c
Example 2:
Input: c f j Target: c Output: f
Example 3:
Input: c f j Target: j Output: c
Input format: First line: space-separated characters. Second line: target character.
Output format: The smallest character strictly greater than target (wraps around).