Search⌘ K
AI Features

Remove All Adjacent Duplicates in String II

Remove All Adjacent Duplicates in String II gives a string and an integer k. Repeatedly remove groups of k adjacent equal characters until none remain, then return the final string.

Statement

Given a string s and an integer k, a k-duplicate removal involves ...