Driver program
public static void Main ( string [ ] args ) { string str = " geekcodergeeks " ; int [ ] arr = new int [ ] { 1 , 2 , 1 , 3 , 4 , 2 , 6 , 4 , 6 , 2 , 3 , 3 , 3 , 2 } ; int n = arr . Length ; Console . Write ( findCost ( str , arr , n ) ) ; } }