Driver code
public static void Main ( String [ ] args ) { int N = 5 ; Stack < int > s = new Stack < int > ( ) ; s . Push ( 1 ) ; s . Push ( 2 ) ; s . Push ( 3 ) ; s . Push ( 4 ) ; s . Push ( 6 ) ; int [ ] a = { 6 , 3 , 4 , 1 , 2 } ; countEle ( s , a , N ) ; } }