ServiceNow·Software Engineer·Technical Phone Screen
May 2026
ServiceNow coding round, one problem but it had two parts that tripped me up more than expected. The string manipulation itself wasn't the hard part, getting the lexicographically smallest result while staying at the minimum replacement count took some extra thought.
- Given a string where you can only replace characters (no insertions or deletions), find the minimum number of replacements to satisfy a condition like making it a palindrome. Then, among all strings that achieve that minimum, return the lexicographically smallest one.
“Part one clicked pretty fast.”