qaz@lemmy.world to Programmer Humor@programming.devEnglish · 14 天前Who cares about time complexitylemmy.worldimagemessage-square69fedilinkarrow-up1452arrow-down12
arrow-up1450arrow-down1imageWho cares about time complexitylemmy.worldqaz@lemmy.world to Programmer Humor@programming.devEnglish · 14 天前message-square69fedilink
minus-squarelugal@lemmy.dbzer0.comlinkfedilinkarrow-up2·12 天前The original doesn’t have an extra check for 9 and it works for Roman->Indioarabic because it’s: IX ->IVV ->IIIIV ->IIIIIIIII But the other way around, you need an extra step for 9. That’s where our misunderstanding comes from.
The original doesn’t have an extra check for 9 and it works for Roman->Indioarabic because it’s:
IX ->IVV ->IIIIV ->IIIIIIIIIBut the other way around, you need an extra step for 9. That’s where our misunderstanding comes from.
Ohhh haha that makes sense. Fun!