donnemartin / interactive-coding-challenges

120+ interactive Python coding interview challenges (algorithms and data structures). Includes Anki flashcards.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Implement n stacks using a single array" solution uses 2 arrays

pedrosorio opened this issue · comments

Why not include the stack pointer at the top of each stack so you can do this with a single num_stacks * (stack_size + 1) array?

Also, it is not clear why abs_index is part of the interface (as that is not part of the stack interface). Its purpose should be made clear in the challenge notebook.