Skip to content

Latest commit

 

History

History

palindromeRearranging

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Check Out My YouTube Channel

Algorithm Challenge Available At CodeFights

Given a string, find out if its characters can be rearranged to form a palindrome.

Example

For inputString = "aabb", the output should be palindromeRearranging(inputString) = true.

We can rearrange "aabb" to make "abba", which is a palindrome.

Hints

  • split()
  • hasOwnProperty()

Input/Output

  • [time limit] 4000ms (js)
  • [input] string inputString

A string consisting of lowercase English letters.

Guaranteed constraints:

1 ≤ inputString.length ≤ 50.

  • [output] boolean

true if the characters of the inputString can be rearranged to form a palindrome, false otherwise.