Browser Tab History Data Structure

Problem

Design a data structure that simulates browser tabs/history: open a tab (navigate to a page), close the current tab, and go back to the previous page.

Example

open(A), open(B), back() -> A, close()

Constraints

  • Up to 10^5 operations
  • Define the close semantics (behaves like back, or drops the current tab entirely)
added …
LeaderboardSalaryAccount