JPDev@programming.dev to Programmer Humor@programming.dev · 10 months agoReturns a sorted list in O(1) timeprogramming.devimagemessage-square19fedilinkarrow-up122arrow-down11
arrow-up121arrow-down1imageReturns a sorted list in O(1) timeprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 10 months agomessage-square19fedilink
minus-squareasudox@lemmy.worldlinkfedilinkarrow-up0·10 months ago50/50 chance of being right in O(1) time
minus-squareandnekon@programming.devlinkfedilinkarrow-up2·10 months ago50/50 would be for isOdd with the same implementation
minus-squareRikudou_Sage@lemmings.worldlinkfedilinkEnglisharrow-up2·10 months agoIt’s right much more often than just 50/50.
50/50 chance of being right in O(1) time
50/50 would be for
isOdd
with the same implementationIt’s right much more often than just 50/50.