News for hackers. Stuff that matters.
Re:Solving the first 100 Project Euler problems using 100 la... by joshuamcginnis on Thursday January 16, 2025 @06:54PM (#42732485)
Let's say an experienced engineer is starting Euler for the first time. What's the best way to approach it given that many of the problems require some prerequisite algorithmic knowledge to solve? Is there a good method for approaching Euler and LeetCode problems with new eyes aside from reading the solutions first, studying them and then solving it many times until committed to memory?
Re:Solving the first 100 Project Euler problems using 100 la... by eru on Thursday January 16, 2025 @07:14PM (#42732619)
IMHO, Project Euler is a lot harder than LeetCode and requires a lot more math.

I'm not sure why you would want to solve it many times and committing those solutions to memory? I think you would be better off using some of the time to just read some text books?

For some of Project Euler https://www2.math.upenn.edu/~wilf/gfology2.pdf is a good math book to consult. The techniques in there will allow you to solve some of the problems with just pen and paper (and perhaps a pocket calculator, if you are too lazy to do the arithmetic by hand, but no need for a full blown programmable computer), especially the first few problems if memory serves right. Eg where they ask you to add up the first few billion even terms of the Fibonacci numbers and similar; you can just derive a simple closed formula and evaluate that by hand.

Re:Solving the first 100 Project Euler problems using 100 la... by vram22 on Friday January 17, 2025 @05:47AM (#42736177)
What is a closed formula?
Re:Solving the first 100 Project Euler problems using 100 la... by drysine on Friday January 17, 2025 @07:04AM (#42736671)
Re:Solving the first 100 Project Euler problems using 100 la... by vram22 on Saturday January 18, 2025 @01:58AM (#42746459)
Thanks.
Re:Solving the first 100 Project Euler problems using 100 la... by xzyyyz on Thursday January 16, 2025 @07:15PM (#42732620)
Project Euler is collection of puzzles based on math. The coding and designs skills are completely secondary to the math. The algorithms (except for computational number theory, computation geometry) are completely secondary. So it is knowledge of math that is barrier.

I keep learning math (and, sometimes, relatively new development in math) by solving problems. To start, I would recommend reading G.H. Hardy & E.M. Wright "An Introduction to the Theory of Numbers".

With LeetCode -- this is more traditional exercise in coding. I did not pay much attention to it. So, sorry, cannot provide any advice

Re:Solving the first 100 Project Euler problems using 100 la... by abecedarius on Thursday January 16, 2025 @10:56PM (#42733908)
Really it's fine to just start. At some point you may get stuck and want to learn more math, but when I did the first ~45 I certainly had not read generatingfunctionology or Hardy and Wright.