FastPrepPalindrome Permutation
Problems/Palindrome Permutation

Palindrome Permutation

Rippling logoRippling● EasyNEW GRADOA
QuestionFunctionExamplesConstraints

Problem statement

Source note: The report identifies the standard palindrome-permutation exercise. Alphabet, empty-input behavior and bounds are practice conventions; core source match is about 90%.

Given a string s, return whether its characters can be rearranged into a palindrome. Use every character exactly once.

A palindrome reads the same forwards and backwards. The empty string is considered a palindrome.

Function

canPermutePalindrome(s: String) → boolean

Examples

Example 1

s = "aabbc"return = true

The characters can form abcba.

Example 2

s = "daily"return = false

More than one character has an odd frequency.

Example 3

s = "civic"return = true

The supplied string is already a palindrome, so a valid rearrangement exists.

Constraints

  • 0 <= s.length <= 5000.
  • s contains lowercase English letters only.

More Rippling problems

  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Dependency-Aware Task SchedulerPHONE SCREEN · Seen Nov 2026
  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
All Rippling interview questionsSee Rippling hiring insights
Saved
public boolean canPermutePalindrome(String s) {
    // Write your code here.
}
Checking account…