Validate a Balanced INDENT and DEDENT Token Stream

Read the full interview experience this question came from →

Quick Overview

Validate whether an INDENT and DEDENT token stream remains balanced at every prefix and closes all open levels at the end. This compact problem tests one-pass state tracking, early rejection, empty-input behavior, and the difference between global counts and structural ordering.

Validate a Balanced INDENT and DEDENT Token Stream

Company: Figma

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Validate whether an INDENT and DEDENT token stream remains balanced at every prefix and closes all open levels at the end. This compact problem tests one-pass state tracking, early rejection, empty-input behavior, and the difference between global counts and structural ordering.

Read the full Figma Software Engineer interview experience this question came from

Figma logo
Figma
Jul 21, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
23
0
Practice
Loading...