nextbit needs to be 0 because each time we call the function recursively , we call 2 times for 2 cases : next bit is 0 or 1 The is to assure that the binary string is printed one time only
if occur == 2 and nextbit == 0 : NEW_LINE INDENT printBinStr ( string , length ) NEW_LINE DEDENT return NEW_LINE