C # program to check clockwise or counterclockwise order in an array
using System ; class GFG { static bool check_order ( int [ ] arr ) { int cnt = 0 ; for ( int i = 0 ; i < arr . Length - 1 ; i ++ ) { if ( Math . Abs ( arr [ i + 1 ] - arr [ i ] ) > 1 ) cnt ++ ; }