JPDev@programming.dev to Programmer Humor@programming.dev · 8 months agoReturns a sorted list in O(1) timeprogramming.devimagemessage-square7fedilinkarrow-up10
arrow-up10imageReturns a sorted list in O(1) timeprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 8 months agomessage-square7fedilink
minus-squareAsudox@lemmy.worldlinkfedilinkarrow-up0·8 months ago50/50 chance of being right in O(1) time
minus-squareRikudou_Sage@lemmings.worldlinkfedilinkEnglisharrow-up1·8 months agoIt’s right much more often than just 50/50.
minus-squareandnekon@programming.devlinkfedilinkarrow-up1·8 months ago50/50 would be for isOdd with the same implementation
50/50 chance of being right in O(1) time
It’s right much more often than just 50/50.
50/50 would be for
isOdd
with the same implementation