Driver code
public static void Main ( ) { char [ ] s = { ' b ' , ' a ' , ' n ' , ' a ' , ' n ' , ' a ' } ; int n = s . Length ; int k = 2 ; char [ ] t = new char [ n ] ; subsequence ( s , t , n - 1 , k ) ; for ( int i = 0 ; i < t . Length ; i ++ ) if ( t [ i ] != 0 ) Console . Write ( t [ i ] ) ; } }