Available question text
Find the length of the longest substring of a digit string that can be rearranged into a palindrome (i.e., at most one digit has an odd count). Solve by tracking prefix parity with a 10-bit mask and, for each position, using the earliest index seen for the same mask or any mask that differs by one bit to compute the maximum length efficiently.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1542. Find Longest Awesome Substring
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source