qaz@lemmy.world to Programmer Humor@programming.devEnglish · 1 month agoWho cares about time complexitylemmy.worldimagemessage-square43linkfedilinkarrow-up1390arrow-down12
arrow-up1388arrow-down1imageWho cares about time complexitylemmy.worldqaz@lemmy.world to Programmer Humor@programming.devEnglish · 1 month agomessage-square43linkfedilink
minus-squaredfyx@lemmy.helios42.delinkfedilinkarrow-up36·1 month agoThere could be a hidden quadratic cost because the string needs to be reallocated and copied multiple times.
minus-squareKogasa@programming.devlinkfedilinkarrow-up5·1 month agoNot quadratic in the length of the input. Assuming replace is linear this is also linear
There could be a hidden quadratic cost because the string needs to be reallocated and copied multiple times.
Not if I don’t see it.
Not quadratic in the length of the input. Assuming replace is linear this is also linear