Working on some bit masking problems to get a handle of bit masking. Uhh so at the end I make a slight mistake. I have the correct solution already but start messing with it. I should not do the k - 1 because k = 0 will not work.
https://practice.geeksforgeeks.org/pr...