Deloitte interview question

Valid parenthesis nd linked list based questions