Given a non-empty string s, return its middle character. If the length is even there is no single middle, so return the two middle characters together.
Examples
Input: s = "hello"
Output: "l"
Input: s = "test"
Output: "es"
Constraints
1 <= len(s) <= 2000smay contain any printable characters
Goals
- Compute the middle index from the length
- Return one character for odd lengths and two for even lengths