LC 49
Group Anagrams
Medium · LC 1–100
Candidate solution routes
Primary
FreeFrequency Table / Coordinate Counting
Invariant: After scanning a prefix, count[x] equals x's exact multiplicity there; counts stay nonnegative and their sum equals inserted items minus consumed items.
candidate confidence: 0.358 · metadata_only
Alternate 1
FreePrefix State plus Hash Frequency
Invariant: Before processing position i, the table contains exactly the historical prefixes allowed as left boundaries; query-before-insert avoids using a future or self state accidentally.
candidate confidence: 0.368 · metadata_only
How to use this page
Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.