Driver code
public static void Main ( String [ ] args ) { int [ ] a = { 2 , 3 , 9 , 2 , 2 } ; int n = a . Length ; if ( isMajority ( a , n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }