BNY interview question

Valid parenthesis, in- memory node deletion from linkedlist