NeetCode #543LC-767MediumHeap / Priority QueueNC 250
← Back to All Problems#543 · #767 · Reorganize String(重构字符串)
📌 Problem Statement & Constraints
Given a string
s, rearrange its characters so that no two adjacent characters are the same. Return any valid arrangement, or the empty string if impossible. Constraints: 1 <= s.length <= 500, lowercase letters.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!