Pergunta de entrevista da empresa Capital One

Given a "command" object, which contains one of 3 possible function types(add, delete, undo), an int length, and str char. Implement a function to parse commands and take appropriate actions on a string.

Resposta da entrevista

Sigiloso

2 de set. de 2020

Can we create Stack and keep adding the input char for "add" command, pop the last one for "undo" command, and remove a particular char for "delete" command.