r/badcode • u/zshadowjon • Jul 29 '21
python Was doing some bug hunting and found essentially what was a sum to n function but of O(fuck) time complexity
1.2k
Upvotes
r/badcode • u/zshadowjon • Jul 29 '21
View all comments
Show parent comment
0
u/WinstonCaeser Jul 30 '21
My CS professors specifically taught me different multiplication algorithms and expected me to implement them, including grade-school, karatsuba, toom-cook, and finally I learned about, but did not implement Schönhage–Strassen. We discussed at length when to consider the number to be itself a single unit, or a series of digits.