Simulate browser back/forward behavior using a stack!
Hi! I'm Teju 👋 We're implementing a simple browser history using a stack.
PUSH → Visit a new page (adds to top)
POP → Go back (removes latest page)
PEEK → Current page
ISEMPTY → Check if no pages visited
Operations: PUSH x | POP | PEEK | ISEMPTY
Output: Results of POP, PEEK, ISEMPTY
Stack behavior: Last In, First Out (LIFO)
Stack is perfect for browser history because you always go back to the most recently visited page.
Enter commands and click Run Simulation...
Outputs will appear here...