There are
nwindows open numbered from1ton, we want to simulate using alt + tab to navigate between the windows.You are given an array
windowswhich contains the initial order of the windows (the first element is at the top and the last one is at the bottom).You are also given an array
querieswhere for each query, the windowqueries[i]is brought to the top.Return the final state of the array
windows.
1 | class Solution { |