text: Driver Code
code: public static void Main ( ) { String [ ] inputs = { " IDID " , " I " , " DD " , " II " , " DIDI " , " IIDDD " , " DDIDDIID " } ; foreach ( String input in inputs ) { Console . WriteLine ( getMinNumberForPattern ( input ) ) ; } } }