text: Returns true if a permutation of arr [ 0. . n - 1 ] can form arithmetic progression
code: bool checkIsAP ( int arr [ ] , int n ) { unordered_map < int , int > hm ; int smallest = INT_MAX , second_smallest = INT_MAX ; for ( int i = 0 ; i < n ; i ++ ) {