Yandex interview question

Implement a code linter that finds missing brackets.

Interview Answer

Anonymous

21 June 2021

I went with a state machine approach to do it all in a single pass. However, without proper design (having State Machine in a separate class and Transitions defined as a graph with edges as conditions and states as nodes) it's extremely hard to put everything together in a single wall of code. It did count as an "almost working" solution, so I think I passed this one.