Check whether exactly two elements of a sorted array were swapped.
Unlock detailed company stats for this questionUpgrade
Given an array sorted in ascending order in which two elements may have been swapped: return true if only 2 elements are swapped, and false if more than 2 elements are misplaced.
Community answers
No answers contributed by the community yet.


