Glossary: Coding Interviews in Go
Stack
Also written: pattern 4
A last-in, first-out collection used for 'most recent', 'undo' and 'cancel out' problems. In Go it is a slice where `append` pushes and `stack[:len(stack)-1]` pops.
Glossary: Coding Interviews in Go
Also written: pattern 4
A last-in, first-out collection used for 'most recent', 'undo' and 'cancel out' problems. In Go it is a slice where `append` pushes and `stack[:len(stack)-1]` pops.