dimanche 29 juillet 2018

Code to find next binary string in the lexicographic order as an output with the same number of ones?

Lets say Input is - 1011 (11), then the output should be :- 1101 (13)...

Other example could be :- input - 0110 (6) and output - 1001 (9)...

Aucun commentaire:

Enregistrer un commentaire