Make Lexicographically Smallest Array by Swapping Elements | Leetcode 2948