← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given an array of photo layers, each represented by a unique integer ID, and a list of layers that the user has selected. Whenever a layer is selected it is moved to the top of the stack (the end of the array). If the same layer is selected more than once, only the first selection has any effect; later selections are ignored. Return the final order of the layers after all selections have been processed.