Validate INDENT/DEDENT Token Sequence

Problem

You are given a pre-tokenized sequence tokenized containing:

  • INDENT, which enters one indentation level;
  • DEDENT, which exits one indentation level;
  • arbitrary other tokens, whi...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: