LeetSolve
Published in

LeetSolve

C++ Solution to Coding Challenge 1209. Remove All Adjacent Duplicates in String II

An example of using a std::vector as a std::stack

Problem statement

You are given a string s and an integer k, a k duplicate removal consists of choosing k adjacent and the same letters from s and removing them, causing the left and the right side of the…

--

--

LeetSolve shares how to solve a coding question in C++. The questions are selected from leetcode.com. You can learn from LeetSolve’s posts essential algorithms, basic data structures, elementary C++ programming language and common coding techniques.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store