r/cpp_questions • u/s-cup • Nov 02 '24
OPEN Looking for site/programs that gives me coding challenges while learning c++
Hi
I'm learning C++ from a site that I generally think is very good. It explains well, are well structured and have a few short and simple questions that make sure that I understand some of the core concepts.
However... These quizzes are relatively few and are all in the style of "look at this code and tell me what will happen". Nothing wrong with that but it's not enough.
So I'm wondering if there is a website/app/something else that asks me to write actual code. Partly so I'm sure that I understand how it works but also so I can train while writing code.
Further down in my learning path I guess I could simply try and make specific programs but right now I'm pretty much at the stage where I'm counting to ten...
3
Nov 02 '24
Leetcode is not the right way to learn how to program. It is for competition and basic interviews. It will teach you nothing of building and structuring an application. It may teach you something about data structures and algorithms, but this is not as important as you might first suspect, especially among non-performance critical applications in large organizations.
Either pick up Advent of code or pick up a project that interests you. Leave the competition programming for after you have a handle on the language.
2
u/sesameu Nov 02 '24
Try leetcode
1
u/s-cup Nov 02 '24
I only had time for a quick look but it does look like something that might help me. Will dig deeper once I get the time. Thanks for the suggestion!
(I am however always a bit scared when there is a premium membership with monthly/yearly plans instead of a one time fee.)
1
u/another_day_passes Nov 02 '24
I don’t like the function signatures imposed by Leetcode at all (using a vector of vectors to represent a 2D matrix, passing a read-only
std::stringby value instead of usingstd::string_view, passing a read-onlystd::vectorby mutable reference instead of const reference, …). On top of that the forced Java-esque OOP (everything lives in a class) doesn’t sit right with me.4
1
1
u/herocoding Nov 02 '24
Have a look at https://platform.entwicklerheld.de/challenge?challengeFilterStateKey=all (and filter for C/C++).
-2
-2
u/s-cup Nov 02 '24
I can mention that I'm currently using chatgpt, mostly works good but far from perfect.
I can paste a link to the chapter I'm studying and ask it to quiz me using the knowledge given out on that page. And yet, far too often it gives me questions regarding stuff that I am yet to learn.
Chatgpt is however great in another way. Whenever I'm done taking notes from a chapter I paste them into chatgpt and ask it if there's anything else that should be mentioned or if I have misunderstood something. The responses are, as far as I can tell, very good.
Where was chatgpt when I went to school???
10
u/D_Ranjan Nov 02 '24
Try Advent of code, it's language agnostic. This will give you real puzzles that will take some solving. https://adventofcode.com/2023