Design Browser History
Implement browser history starting at a homepage. visit url opens a page and clears all forward history; back k moves back at most k steps; forward k moves forward at most k steps. Print the current page after every back and forward operation.
Constraints
1 <= q <= 5000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.