Question d’entretien chez Myntra

Write an algorithm to check in in an integer array, the array can be sorted by just one exchange of elements

Réponse à la question d'entretien

Utilisateur anonyme

11 mai 2017

By sorting the array and then seeing the number of elements that are different in the original and the sorted array