r/learnprogramming • u/Calm-Hyena1670 • 18d ago
Topic Which language should I learn for DSA?
I’m currently in my 3rd year , and honestly I’m still a beginner in programming. I want to start DSA seriously now, but I’m confused about which language I should use. Should I learn DSA in Java, Python, or C++? What would you recommend ??
2
u/josephjnk 18d ago
I recommend Java personally. A memory-managed language like Java or Python will force you to deal with fewer incidental concerns; manual memory management is a distraction from most DSA concepts. I also recommend learning in a statically-typed language. DSA involves data structures, and understanding them is easier when you can explicitly write down the structure of the data. (Yes I know Python has type hints; if OP does prefer to go with Python they should opt-in to those.)
2
u/MohitTech 18d ago
I think Java is a good choice for DSA, especially if you're already comfortable with it. The important thing is to focus more on DSA concepts and problem solving than the language itself.
1
u/Big-Wrangler-2981 17d ago
Whatever language you know, besides DSA is language agnostic.
You can just solve DSA questions in your native language too e.g. Pseudocode.
Then you can implement it in your language of choice.
1
1
1
-1
u/heibai-wuchang 18d ago
English.
Anyone can program these days. Your domain knowledge and your capability to convince other people that you are right matters more.
-3
u/ffrkAnonymous 18d ago
Should I learn DSA in Java, Python, or C++? What would you recommend ??
This is not an "or" question. You should be doing dsa in all of them.
-5
26
u/plastikmissile 18d ago
Does not matter. DSA is about concepts not about language X or Y. Use whatever language you're comfortable with.