ByteDance / TikTok logoByteDance / TikTok
Coding·30 minMembers

Remove Duplicate Letters for Lexicographically Smallest Result

Members only

Given a string, remove duplicate letters so each character appears exactly once and the final string is lexicographically smallest among all valid results. The round explicitly included the two standa...

SWE
string
stack
monotonic-stack
greedy
medium
Frequency
Low
Last asked
2026-07-13
Stage
phone-screen

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...