DEV Community 👩‍💻👨‍💻

Discussion on: Go Luddites

hymanzhan profile image
Xucong ZHAN

The code examples are just using two well-known basic math formulas that you can pick up from high school math on the series topic, at least that's the case in my region. For such numerical or mathematical problems, you simply reproduce the formula in code. And just want to add that, it's not only for cleaning up logic; It's much more efficient and performant. (O(1) vs O(n))
For more programming related ones that you are more likely to use in your job, learn the basics of data structure and algorithms. I find this book very helpful and easy to read.