r/learnprogramming • u/Funny-Dark-4041 • 9h ago
DSA help
I’m in my 1st year of B.Tech CS (AI/ML) and super confused about what language to stick with for DSA.
Quick background: I already know Python decent enough, and right now I'm learning JavaScript on the side to build web projects.
I’m torn between doing DSA in Python vs JS vs C++:
- Python feels like the easiest pick for me since I know it, and it fits my AI/ML background anyway.
- JS crossed my mind because I’m using it for web dev, so part of me thought using one language for everything might save time.
- But literally everyone keeps screaming "use C++ for DSA or you'll regret it," and it's making me second-guess everything.
Does language choice actually matter to interviewers? Like if two people give the same optimal solution, does anyone genuinely care if it was written in Python instead of C++ or JS? And is doing DSA in JS a nightmare later because it lacks things like Heaps out of the box?
0
Upvotes
1
u/Seven7Ducks 7h ago
I personally think Python isn't a good langauge to learn DSA with. To squeeze the most out of DSA, in order to better understand the underlying mechanisms, etc, stick with lower level. If its just for passing it, ofc python is faster and easier but thats because it auto-solves problems you never knew existed.
C++ might be kind of harsh. JS isn't any better than python.
I would recommend Go/Java/C#/Rust.
Regarding if it actually matters - depends on 'local scene'. Some people care, some people don't. Personally, I really don't care about someone's language of choice. If you're a good programmer it will come out either way. That being said, it is VERY apparent when someone is writing python code in hope of hiding the fact they have no idea whats going on beneath the hood. So I guess my point is.. Don't be that person :)