Tap here to switch tabs
Problem
Submissions

Problem: Find Longest Awesome Substring

Find Longest Awesome Substring asks you to choose a nonempty substring of a digit string that can be rearranged into a palindrome, then return the maximum possible length.

Statement

Given a string s consisting of digits.

An awesome substring is a non empty substring of s that can be rearranged into a palindrome by performing any number of swaps on its characters.

Return the maximum length of an awesome substring in s.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists only of digits.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find Longest Awesome Substring

Find Longest Awesome Substring asks you to choose a nonempty substring of a digit string that can be rearranged into a palindrome, then return the maximum possible length.

Statement

Given a string s consisting of digits.

An awesome substring is a non empty substring of s that can be rearranged into a palindrome by performing any number of swaps on its characters.

Return the maximum length of an awesome substring in s.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists only of digits.