Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1542. Find Longest Awesome Substring
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.