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