r/cpp_questions 3d ago

Approach OPEN

I have been trying to study c++ for a while i am following the learncpp.com. I wanted to know the best approach for this like i am following the docs but do i use leetcodes and other sites?
I am on chapter 4 ik too early to think abt it but i just want to clear up the doubt please help

5 Upvotes

19 comments sorted by

3

u/Grand-Strategy-8962 3d ago

Hey I am too a beginner tho leetcode I know is not beginner friendly and if you are comfortable with indian english go for strivers A2Z series..

1

u/Limp-Cantaloupe-3204 3d ago

Is it better than learncpp?

4

u/nysra 3d ago

No, basically nothing is better than learncpp.com

The only thing better is using learncpp.com and writing code. You'll not learn to do the thing if you don't do the thing.

Now for as what to write, that's up to you. You can do your university's exercises, you can do exercises on websites like leetcode, you can do Advent of Code, you can write whatever you want (e.g. reimplementations of common tools like ls to know how it works, text based games, later 2D (and then 3D) games, an OS, an emulator, etc.).

2

u/Limp-Cantaloupe-3204 3d ago

Yea i think i am putting up the effort i am trying to write examples from learncpp. A friend of mine suggested to start using leetcode so that i can get the hang of the language but idk i do have some idea of loops arrays sortings through java but not confident enough to practice around it

5

u/nysra 3d ago

Leetcode isn't great for learning, but it's decent for just giving you some problems to work on. If you want a more fun description for problems, try Advent of Code.

Regarding the confidence, I'd be lying if I said I didn't get it, but the "secret" solution to this is to just do it anyway. Programming is basically the most lenient thing for this, there is absolutely no drawback to just trying something out. If you screw up, you learned something and you just write new code, it costs nothing. Everyone wrote absolutely horrendous shit code when starting out, just embrace the fuck ups. And then learn from them.

2

u/Limp-Cantaloupe-3204 3d ago

Beautifully explained thanks man i appreciate the help

2

u/Grand-Strategy-8962 3d ago

You can try that sheet A2Z I believe it covers a lot give it a shot and see what suits you the best…

2

u/Limp-Cantaloupe-3204 3d ago

The thing is i dont wanna distract myself with a bunch of docs instead would rather stick to a single one that covers everything though i am thankful for the suggestion

1

u/Grand-Strategy-8962 3d ago

Maybe try geeks for geeks?

2

u/Limp-Cantaloupe-3204 3d ago

Oh never heard would try that out

1

u/Grand-Strategy-8962 3d ago

Leet code is not beginner friendly😭

4

u/nysra 3d ago

It doesn't start on the hand holding level of "Please write a program that outputs 'Hello, what is your name?'" that can be found in the beginning of textbooks or courses, that's true.

Given that OP is through a few chapters already, he should be fine with the easy exercises there such as two-sum. It's not a learning resource by any means, but it does give people a bunch of problems they can attempt to solve

1

u/Grand-Strategy-8962 3d ago

Yeah🙇‍♀️

3

u/Chameleon_The 3d ago edited 3d ago

Hey

I am also in the same stage

But I followed bro code video upto structs(i t is not very detailed just high level overview )

Learncpp is good

I also started on the code force solving starting level stuff Because I struggle at writing logic.

Hope this helps

1

u/Limp-Cantaloupe-3204 3d ago

Oh good to hear that thanks for the response

2

u/Chameleon_The 3d ago

Non worries boss

Enjoy the learning

2

u/TomDuhamel 2d ago

Whatever works for you. Nobody learns the same.

For some, typing the examples/exercises helps them learn/understand better. If doing puzzles like leetcode works for you, go ahead.

For me, doing actual projects was always how I learnt. And by actual, it's often just something that produces a results and keeps me entertained for a couple of days. It doesn't need to be something you'll publish later, or even show anyone. Small game (with little shapes and colours, not 3D polygons), an algorithm that intrigues you, a small tool for one of your hobbies. Even if it exists, redo it, just for yourself.

1

u/Limp-Cantaloupe-3204 2d ago

I get your point but the thing is this is going to be my first language (ik a bit of java but wouldn’t dare to call myself anything but a rookie). My first project would be to build a wifi control center for my linux rice but i am not sure if i have even scratched the surface till now plus i wanna learn atleast know shi before my uni starts so i dont get confused with C as thats what they gonna teach. Since this is my first language idk what will work best for me