Remove All Adjacent Duplicate Pairs

Quick Overview

Repeatedly remove equal adjacent character pairs until a Unicode string becomes stable. Use a stack-like single pass to expose newly adjacent duplicates, preserve pairwise run behavior such as three equal characters becoming one, and achieve linear time.

Remove All Adjacent Duplicate Pairs

Company: Whatnot

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

Overview: Repeatedly remove equal adjacent character pairs until a Unicode string becomes stable. Use a stack-like single pass to expose newly adjacent duplicates, preserve pairwise run behavior such as three equal characters becoming one, and achieve linear time.

Whatnot logo
Whatnot
Jul 14, 2026
hardSoftware EngineerTechnical ScreenCoding & Algorithms
12
0
Loading...