ByteDance / TikTok logoByteDance / TikTok
CodingMembers

Lexicographically Smallest Generated String (LC 3474)

Members only

A hard string-construction problem from a TikTok SWE onsite coding round. The output must be as small as possible while satisfying overlapping must-match and must-not-match constraints, and the difficulty lies in resolving conflicts between windows without undoing earlier commitments.

SWE
string
greedy
hard
Frequency
Single report
Last asked
2026-11-14
Stage
onsite-coding

Members get

  • Full problem statement
  • Step-by-step approach
  • 4 common pitfalls
  • Preparation drills

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...