Skip to main content
dcromley's user avatar
dcromley's user avatar
dcromley's user avatar
dcromley
  • Member for 6 years, 6 months
  • Last seen more than 4 years ago
  • Cheyenne, WY
awarded
awarded
comment
Understanding Binary Search for Kth Smallest element in an Array
@Yuval Filmus Looking at YF's answer, he has a 2nd array B, which is, like, cheating. If array A is [ 1003, 1002, 1001 ], and B[i] is the number of elements in A which are at most i, we have B = [ 0, 0, 0 ]. ?
comment
Understanding Binary Search for Kth Smallest element in an Array
Prima facia, binary search does not work for unsorted lists. Are you saying it DOES work? If so, I would like to reproduce it and examine it. I think someone is neglecting the fact of "unsorted".
comment
Is this the right way to convert a negative floating point number in binary using two's complement method?
01110.1100+10111.0000=100101.1100 -- I can't follow the Q's and A's, but this looks like 14.75-9=5.75. No mistake?
comment
Given a random number generator rand5() generate gen7()
@noman pouigt I EDIT'ed in an elaboration. Thanks.
revised
Loading…
awarded
revised
Loading…
Loading…
awarded