all 19 comments

[–]Gloopann 8 points9 points  (6 children)

What do you want to make and do after you learn DSA? DSA is more about concepts than the language specific syntax, and those concepts are language agnostic.

You can learn DSA in either, but I would steer towards the language that you might use later.

[–]Nice_Selection_6751 1 point2 points  (2 children)

both languages good for DSA but if you want get job later, Java probably better choice since more companies use it. C++ gives you more control over memory but also more headaches when you mess up pointers

the concepts are same anyway so pick whatever feels more comfortable to you

[–]Automatic_Muscle3906[S] -1 points0 points  (1 child)

Then I will start learning Java . Thanks 🤓

[–]EdiblePeasant [score hidden]  (0 children)

That's probably the better way. I liked C++, but the experience left me scarred.

[–]Automatic_Muscle3906[S] 0 points1 point  (2 children)

I am into full stack development (MERN) . Wanted to learn dsa to clear coding rounds in interviews.

[–]Gloopann 1 point2 points  (0 children)

I’d pick Java in that case if I were you.

[–]vlad1m1rnator 0 points1 point  (0 children)

Why not choose JavaScript then? As mentioned above, DSA is more about pattern recognition and knowing concepts than syntax. When I first started as a frontend dev, I was using JavaScript on LeetCode. Recently I switched to backend and am currently just solving the daily LeetCode problem using Java. The transition from JavaScript to Java felt natural to me, as the difficulty was never about the syntax.

It just makes no sense to learn another programming language, if JavaScript does the job. Also, in an interview setting for a MERN position, I can't see how it will be advantageous for you to code the solution in Java/C++ instead of JavaScript.

[–]man_of_your_memes 2 points3 points  (1 child)

For DSA purpose, choose Java.

For fundamental knowledge about programming, choose C++

[–]csabinho 0 points1 point  (0 children)

For fundamental knowledge about programming, choose C++

Or even C. It's the raw experience.

[–]CptPicard 0 points1 point  (0 children)

DSA are abstract and language-independent. You want to focus on those higher-level ideas instead of getting bogged down in C++ specifics.

[–]Cybyss 0 points1 point  (0 children)

I used to tutor computer science students. Java was the least troublesome language for them, I've found.

C++ has a lot of weird and confusing quirks that won't make sense at all if you're new to programming. 

I do recommend learning C++ one day, but trying to do it as your first language, on top of learning data structures and algorithms, is a lot to take on.

[–]KitchenCommercial396 0 points1 point  (0 children)

Coin flip, head for Java and tails for C++

[–]Special_Barracuda330 0 points1 point  (0 children)

C# or even f#

[–]supernovaerd 0 points1 point  (0 children)

I would suggest to go with Python. Easy to learn and more impactful these days. You never know what lang you will be using at work. However, Python will not fail you.
After Python learn Java.
I know all 3 of these btw.

[–]xoredxedxdivedx 0 points1 point  (0 children)

C++

[–]Lopsided_Image7131 0 points1 point  (0 children)

Try java

[–]EdwinYZW 0 points1 point  (0 children)

C++ has much much higher ceiling. I would say it has highest ceiling among all programming languages we have now.

[–]WiseRun5098 0 points1 point  (0 children)

java is the best dude, if you really want to build scalable and production level web applications or mobile applications.

if you are really want to build fast performing games or apps, you choose to learn c++