Bonus1

Bonus1 - 1 Bonus1 Web Browser Simulation Value 1 Point Time...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Bonus1: Web Browser Simulation Value: 1 Point Time Limit: 1 Second Memory Limit: 32768 KB Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forward. In this problem, you are asked to implement this. The following commands need to be supported: BACK BACK BACK BACK : Push the current page on the top of the forward stack. Pop the page from the top of the backward stack, making it the new current page. If the backward stack is empty, the command is ignored. FORWARD FORWARD FORWARD FORWARD : Push the current page on the top of the backward stack. Pop the page from the top of the forward stack, making it the new current page. If the forward stack is empty, the command is ignored. VISIT VISIT VISIT VISIT <url> <url> <url> <url> : Push the current page on the top of the backward stack, and make the URL specified the new current page. The forward stack is emptied.specified the new current page....
View Full Document

This note was uploaded on 01/23/2012 for the course CS 130a taught by Professor Staff during the Spring '08 term at UCSB.

Page1 / 2

Bonus1 - 1 Bonus1 Web Browser Simulation Value 1 Point Time...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online