take the integers as the maximum value of integer hoping the integer would not be present in the array
static void findMajority ( int [ ] arr , int n ) { int count1 = 0 , count2 = 0 ; int flag = 0 ; int first = Int32 . MinValue ; int second = Int32 . MaxValue ; for ( int i = 0 ; i < n ; i ++ ) {