Amazon interview question

How do you implement 2 stacks in a Fixed size array?

Interview Answer

Anonymous

Jul 17, 2019

by taking end indices as bottom and top..Updating top on Push.. and Check overflow on top(stack1)==top(stack2)