## HackerEarth Permutations problem solution

In this HackerEarth Permutations, problem solution you are given a permutation A = {a1,a2,a3,…aN} of N integers from 0 to N – 1. You are also given Q queries of the following two forms: X Y: Swap (ax, ay) L R K: Print MexK (aL,….,aR) Here, MexK(aL,…,aR) = Kth smallest non-negative integer that is not available in…