Google interview question

Coding to parse a netlist