Mac@programming.dev to Programming Horror@programming.dev · 6 months agostring.lower implementationprogramming.devimagemessage-square15fedilinkarrow-up188arrow-down12
arrow-up186arrow-down1imagestring.lower implementationprogramming.devMac@programming.dev to Programming Horror@programming.dev · 6 months agomessage-square15fedilink
minus-squarecadekat@pawb.sociallinkfedilinkarrow-up8·edit-26 months agoThis looks like O(n), because you don’t include constants when calculating Big-O. It’s still ~26 times slower than the implementation without the inner loop. This looks like O(n^2) because of the sub.
I hope this is O(n!)
This looks likeO(n)
, because you don’t include constants when calculating Big-O. It’s still ~26 times slower than the implementation without the inner loop.This looks like
O(n^2)
because of thesub
.