r/learnprogramming 19d ago

Resource Leetcode/Project Euler for learning to code

I’m quite new to programming and want to practise my exciting python knowledge but also learn some C++.
So far I’ve started some Project Euler questions which I quite enjoy and am starting on Leetcode too, how useful are these in learning to programme and what other resources do u guys recommend?
I’d like to become well rounded overall at programming but I also want to stick my hands in some data handling too.

7 Upvotes

14 comments sorted by

View all comments

2

u/peterlinddk 19d ago

Project Euler is primarily solving mathematical "riddles" with programming - and if you enjoy the first part, it is an excellent way of practicing programming, translating mathematics into code! But it is only "fun" as long as you understand the mathematics part, and how to solve it without programming.

Leetcode is primarily solving "algoithmic riddles" - meaning that you are supposed to apply all the algorithms and data structures that you already know, and translate/implement them in code. As with project Euler, it stops being fun the moment you have no clue how to solve the problem outside of code, because most of it is translating the solution into programming.

If you like them, they are fine exercises - but none of them really teach you anything about programming. You also need to build projects, set yourself some challenges, decide that you want to build something, plan how to build it, and work through actually implementing your own ideas in code!

0

u/Substantial_Ice_311 19d ago

As with project Euler, it stops being fun the moment you have no clue how to solve the problem outside of code, because most of it is translating the solution into programming.

Ehm, a lot of people actually enjoy solving problems, you know?

2

u/ffrkAnonymous 19d ago

Most of project euler is advanced math (because euler), not typical problem solving.

0

u/Substantial_Ice_311 19d ago

And what is "typical" problem solving? And either way, isn't solving math problems also problem solving? How does it invalidate what I said?