Katkat
Other

A Greedy String-Parity Coding Problem

DRWSoftware Engineer · New Grad · Other · Mar 2026

I ran into a greedy string problem. Given a string digits made up only of the characters '1' and '2', representing a positive integer, you can delete zero or more characters. After deleting, the requirements are: The remaining '1's must appear an even number of times. The remaining '2's must also appear an even number of times. Subject to those two conditions, the resulting integer should be as l…

Shared by a candidate · reported Mar 2026. Interview formats change; use it as a guide, not a script.