PROBLEMS|MOD 13|HARD

Construct K Palindrome Strings

Algorithms: Searching, Sorting & Big-O

Given a string `s`, return `True` if it is a palindrome, `False` otherwise.

// EXAMPLES

Example 1:
Input: Input: racecar
Output: True
Explanation: Result for example 1 of Construct K Palindrome Strings.
Example 2:
Input: Input: hello
Output: False
Explanation: Result for example 2 of Construct K Palindrome Strings.

// CONSTRAINTS

  • 1 <= len(input) <= 10^5
  • Time Complexity target: O(N) or O(N log N)
  • Space Complexity target: O(1) or O(N)
  • Evaluated against 600 test cases.
solution.py