3237. Alt and Tab Simulation
ArrayHash TableSimulation
Hints
Hint 1
Let’s answer the queries offline.
Hint 2
Start from the last query until you reach the first query.
Hint 3
Each time, append the value of that query to a
ans array if it wasn’t already appended.Hint 4
Then start from the beginning of
windows and append to ans array if it wasn’t already appended.Preparing judge…