ALT-TAB Window While using a computer, a user uses the ALT-TAB key to switch between applicat The ALT-TAB window works on the principle of holding the ALT key for MRU (Mc Recently Used) listing. Hence, the applications arrange themselves in such a way the most recently used application will be the first item in the ALT-TAB window a forth. You are given the list of opened applications and the number of times that the us presses the 'Tab key' to switch between applications. Find the final arrangement applications in the ALT-TAB window. Example: In the given picture, Libraries application is focused, which means that holding the key, the user presses the Tab key twice. Internet Explorer being the most recently application followed by Libraries and so on.
nput Specification: input1: \( N \), denoting the number applications currently opened on the system. input2: \( K \), denoting the number of times user presses Tab key holding the ALT key input3: An array containing a list of items numbered from 1 to \( \mathrm{N} \). Output Specification: Your function should return the array containing applications in new configuration after K switches. Example 1: input1: 4 input2: 3 input3: \( \{1,2,3,4\} \) Output: \( \{3,1,2,4\} \) Explanation: 4 applications are open. Holding the ALT key, the user presses TAB key 3 times. This pops up application number 3 . Hence, 3 is the most active application in the ALT-TAB panel. Example 2: input1: 10 input2: 7
input1: 4 input2: 3 input3: \( \{1,2,3,4\} \) Output: \( \{3,1,2,4\} \) Explanation: 4 applications are open. Holding the ALT key, the user presses TAB key 3 times. This pops up application number 3 . Hence, 3 is the most active application in the ALT-TAB panel. Example 2: input1: 10 input2 7 input3: \( \{4,1,3,7,6,8,5,2,10,9\} \) Output: \( \{5,4,1,3,7,6,8,2,10,9\} \) Explanation: 10 applications are open. Holding the ALT key, the user presses TAB key 7 times. This pops up application number 5 . Hence, 5 is the most active application in the ALT-TAB panel.