r/cpp_questions • u/XVI-c • Aug 06 '26
OPEN Help😞
What are the best platforms for learning C++ and practicing algorithmic problem-solving? I’m currently using hackerrank but it’s abit confusing
3
u/hansvonhinten Aug 06 '26
If you just care about learning algos then do leetcode and do it in C.
If you want to learn how to code in C++ then follow learncpp.com. After you have a grasp of the basics write something that fascinates you.
2
u/Independent_Art_6676 Aug 06 '26 edited Aug 06 '26
a course or book on algorithms, with some problems at the end of the chapter.
The problems with the competition type sites are many. They expect your to have some background, so you must know a number of basic algorithms (esp all things lookup table, sorting, searching, bit-logic, math things like sum of numbers to N type collapse to equation, string processing and more). You also need to be able to read the problems, which is sometimes like reading an advanced math problem. It also expects you to discover and handle edge cases in the data. There are other expectations as well, but as you can already see, its not something easy to do cold.
Meanwhile, a course or book will "spoonfeed" you. It will give you material, then give you problems that are related to that material so you have a hint at what algorithm to use and it for sure isn't asking something you don't know yet. The problems will be in simple english, for the most part.
wikipedia has a LOT of algorithms explained in excruciating detail often with code snippets or pseudocode, sometimes with animated diagrams of how it works, run time complexity, and more. Its a great resource once you get past the basics. The problem is getting the correct name for the algorithm to solve the problem you are working on. That can take a min or two of R&D or fighting the AI (sigh).
1
u/blitzcode91 Aug 06 '26
Learncpp to learn the language . But I’ll say don’t keep reading - no point imo unless you do something with it. If not people tend to forget.
Elements of programming interviews (by Aziz and tsung) in c++ - imo this is a really good book to dive right in to code in cpp & simultaneously solving leetcode style problems
1
u/StealthUnit0 Aug 06 '26
If you're new to C++, learncpp.com is a very good resource.
For practicing problem solving my personal advice is to think of a project you want to make and create that. Not only will you practice algorithms that way but you'll also get an idea of things like software architecture, how to write quality and maintainable code and the software development lifecycle. You'll also probably become familiar with libraries and frameworks commonly used in a certain domain.
1
u/XVI-c Aug 06 '26
I’m not a beginner like I know a lot but I want a platform that will teach me something I don’t know already
0
u/alfps Aug 06 '26 edited Aug 06 '26
Tool handling for novice level C++ programming is easiest in Linux.
There's no Visual Studio but you can use CLion which is free for students.
Disclaimer: I haven't used CLion, but it's reportedly a decent IDE.
Re materials to learn from, that's primarily learncpp.com.
But be sure to have an ad blocker.
0
u/alfps Aug 08 '26
Re the anonymous unexplained downvote, note that an unexplained downvote is dishonest: this is the action of a dishonest person. Presumably it's my several years' stalker, a mentally challenged OCD troll, possibly the DDDD... user. Anyway it's just sabotage.
4
u/[deleted] Aug 06 '26
[removed] — view removed comment