Backend Engineer
Senior
programming
You need to write a function that will return whether a single string can be rearranged to form a palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization).
Constraints:
- 1 <= s.length <= 2000
- The input string consists of lowercase alphabetic characters only.
Examples:
1. Input: s = "civic"
Output: true2. Input: s = "ivicc"
Output: true3. Input: s = "hello"
Output: false
Suggested Answer