Ad
  • Default User Avatar

    It looks like it should be PadLeft... Lets say you have length 4 and your random returned 7, which is 111. Sure you can padresult. right and it will be 1110, which will be correct result. But this is 14, and ths means that 7(0111) will be never returned. Basiclly you need to pad most significant (left) bit, not last significant one...