## Lexicographically next permutation With One swap

Objective: Given an array of integers (in particular order or permutation of a set of numbers), write an algorithm to find the lexicographically next permutation of the given permutation with only one swap. This problem can also be asked as “Given a permutation of numbers you need to find the next larger permutation OR smallest … Read more