text: Create an array of pairs where first element is array element and second element is position of first element
code: let arrPos = [ ] ; for ( let i = 0 ; i < n ; i ++ ) { arrPos . push ( [ arr [ i ] , i ] ) ; }