News for hackers. Stuff that matters.
Re:A Brutal Look at Balanced Parentheses, Computing Machines... by munificent on Friday February 22, 2019 @05:04PM (#19229557)
Your solution is actually an optimized implementation of a pushdown automata.

nesting_depth is the stack. There is only one kind of symbol that can be pushed, so it's represented as a simple count of the number of symbols that are on the stack.

Re:A Brutal Look at Balanced Parentheses, Computing Machines... by kerkeslager on Saturday February 23, 2019 @08:38AM (#19233264)
Okay, but I don't need to know the concept of a PDA to implement that, nor would I assume a candidate understands PDAs from reading that code.