Driver code
public static void main ( String [ ] args ) { String s = "00110110" ; int k = 2 ; if ( hasAllcodes ( s , k ) ) { System . out . println ( " YES " ) ; } else { System . out . println ( " NO " ) ; } } }