Tap here to switch tabs
Problem
Submissions

Problem: Find Longest Awesome Substring

med
30 min
Try to solve the Find Longest Awesome Substring problem.

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

med
30 min
Try to solve the Find Longest Awesome Substring problem.

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.