2948. Make Lexicographically Smallest Array by Swapping Elements - Explanation

Problem Link