Developer-Student-Clubs-VSSUT-Burla / Master-PyAlgo

36 stars 84 forks source link

Brian Kernighan's algorithm #473

Open U-c0de opened 3 years ago

U-c0de commented 3 years ago

This algorithm basically is as follow:-

When 1 is subtracted from any number then all the bits after rightmost bit having value 1(set bit) and including the right-most set bit itself gets flipped.

U-c0de commented 3 years ago

@i-tick @rcoder23 assign me this