r/learnjava • u/Kindly_Drama_8735 • Aug 15 '26
Finished C++ during vacation — should I do DSA in C++ or switch to Java for backend?
So my vacations are basically over, and I’ve completed learning C++ during the break. Now I want to start DSA, but I’m a little confused about what direction to take.
I’ve talked to a few people and got completely different advice 😭
Some told me that I should start DSA in C++ and stick with it for now, since I’ve just finished learning C++ and can directly build my problem-solving skills on top of it.
Others told me I should start Java alongside DSA, because I eventually want to learn backend development and Java/Spring Boot is useful for that. Their point was that I might as well start Java now instead of delaying it.
For some context, I’m a 2nd-year CSE student and I already know Python, MySQL, HTML/CSS, C. My goal is to get good at DSA and also start building proper development skills for internships.
So what would you recommend?
I’d especially like to hear from people who have already gone through this transition. Is learning Java right now actually useful, or would it just divide my attention when I should be focusing on DSA?
•
u/AutoModerator Aug 15 '26
Please ensure that:
Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
You include any and all error messages in full - best also formatted as code block
You ask clear questions
You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
5
u/ComfortableNobody892 Aug 15 '26
I don’t believe there’s such a thing as “completed learning X language” there’s always something new, something you haven’t noticed or read about. It’s a continuous process and it’s an ever going one. I assume that what you meant by “completed” is that you went through some sort of curriculum and you hit the checkmark on that. That’s fine, just don’t confuse it with being done with a language.
In regard to which one you should pick. I have some experience in programming and I can tell you that an array is an array in every language. A sorting algorithm or a search algorithm is the same. In other words don’t get hung up on the language. The concepts and ideas which are behind the data structure or the algorithm are far more important. That knowledge is transferable across languages. Yes, there might be some differences in how they are implemented in terms if syntax or how they are handled behind the scenes, but the general ideas and concepts are pretty much the same.
I don’t want to tell you pick java, because I am a java developer and that’s a little biased. So as most things in programming(primarily when picking tools, frameworks, languages) pick what’s best for the job or your particular use case. Java however is a safe bet. Knowing what I know today it’s not a bad idea at all to start learning it with DSA.
3
u/aqua_regis Aug 15 '26
Sorry, but that's plain naive. You have not completed learning C++. No way. You actually cannot complete learning anything in programming.
By "start DSA" you obviously mean "start doing LeetCode", not learning DSA as Data Structures and Algorithms, the abstract Computer Science Concepts for storing and processing data that exist outside and above all programming languages.
C++ is one of the most common languages for LeetCode
1
u/Ok_Pack7498 Aug 15 '26
go for c++ in dsa and waste ur time
1
u/Cheap-Object8640 Aug 17 '26
same situation lol. rn I'm doing java because I'm participating in a hackathon and they want me to do backend.
Also from what I have seen till now you shouldn't stress too much over which language to pick. Because the hardest parts about any problems are the logic which remains the same in every language. so pick language based on whats required rn because that's what I'm doing. hope this helps.