@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year agoReturns a sorted list in O(1) timeprogramming.devimagemessage-square27arrow-up1294
arrow-up1294imageReturns a sorted list in O(1) timeprogramming.dev@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year agomessage-square27
minus-square@andnekon@programming.devlinkfedilink5•1 year ago50/50 would be for isOdd with the same implementation
minus-square@Lmaydev@programming.devlinkfedilink3•1 year agoPrimes are not that common especially as numbers get bigger. It’ll be right the vast majority of times.
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 implementationPrimes are not that common especially as numbers get bigger.
It’ll be right the vast majority of times.