Find if slope is good with only two intercept
bool isSlopeGood ( double slope , int arr [ ] , int n ) { set < double > setOfLines ; for ( int i = 0 ; i < n ; i ++ ) setOfLines . insert ( arr [ i ] - slope * ( i ) ) ;