Goldman SachsCoding·60 minMembers
String Compression (Run-Length)
Members only
Run-length-encode a character array in place: `[a,a,b,b,c,c,c]` becomes `[a,2,b,2,c,3]`. Goldman's interviewers consistently expect the in-place version, not a fresh-allocation string output.
SWE
string
two-pointer
compression
medium
Frequency
Low
Last asked
2024-12-27
Stage
phone-screen · onsite-coding
Log in to continue reading the full content
