While using a computer a user the ALT-TAB key to switch between applications. The ALT-TAB window works on the principle of holding the ALT key for MRU listening. Hence the applications arrange themselves in such a way that the most recently used application will be the first them in the ALT TAB window and so forth.
You are the list of opened applications and the number of times that the user presses the ‘Tab key’ to switch between applications. Find the final arrangements of applications in the ALT-TAB window.
Example 1:
Input1:4
Input1:3
Input1: {1,2,3,4}
Output: {3,1,2,4}
Explanations are open .Holding the ALT key the user presses TAB key3 times. This pops up application number 3.hence 3 is the most active application in the ALT-TAB panel.
Example 2:
Input1:10
Input1:7
Input1:{4,1,3,7,6,8,5,2,10,9}
Output:{5,4,1,3,7,6,8,2,10,9}
Comments
Leave a comment