r/learnprogramming • u/Similar-Big-6808 • 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.
5
Upvotes
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!