Interview Question: Rearranged Palindrome

  1. Iterate through each character of the input string and build a character map showing the number of occurrences of each character.
  2. Iterate through the character map and increment a counter variable if the character occurrence is odd.
  3. Check if counter is greater than 1 and return a boolean accordingly.
Rearranged Palindrome Solution (JavaScript)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store