JPDev@programming.dev to Programmer Humor@programming.dev • 8 months agoReturns a sorted list in O(1) timeimagemessage-square4 fedilinkarrow-up180
arrow-up180imageReturns a sorted list in O(1) timeJPDev@programming.dev to Programmer Humor@programming.dev • 8 months agomessage-square4 Commentsfedilink
minus-squaremurtaza64@programming.devhexbear1·8 months agoyou can make it sort the first k elements and it will still be O(1). Set k high enough and it might even be useful linkfedilink
you can make it sort the first k elements and it will still be O(1). Set k high enough and it might even be useful