DEV Community

Discussion on: Solution: Remove All Adjacent Duplicates in String II

Collapse
 
adithyashan11 profile image
Adithya Shankaran

the recursion method used in the c++ code with exceed the memory limit

Collapse
 
seanpgallivan profile image
seanpgallivan

As more tests were added to the testing suite on leetcode, it pushed the less efficient solution to TLE, as you noticed.

Updated the solution to remove the recursion solution, as the in-place stack solution was better, anyway.