Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 767. Reorganize String
Rearrange the characters of a string so that no two adjacent characters are the same, returning any valid permutation or "" if none exists. Key insight: feasibility depends on character frequencies (no letter can occur more than (n+1)/2 times), and it's typically solved with a greedy/priority-queue strategy to place the most frequent remaining letters.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid January, 2025
Amazon
Mid-level
Late August, 2024
Amazon
Intern
Reorganize String (LeetCode 767)
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.