Driver code
public static void Main ( String [ ] args ) { Stack < int > s = new Stack < int > ( ) ; s . Push ( 10 ) ; s . Push ( 20 ) ; s . Push ( 30 ) ; s . Push ( 40 ) ; s . Push ( 50 ) ; int [ ] arr = { 20 , 30 } ; int n = arr . Length ; if ( checkArrInStack ( s , arr , n ) ) Console . Write ( " YES STRNEWLINE " ) ; else Console . Write ( " NO STRNEWLINE " ) ; } }