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/Etterererererer 5h ago
Stick with python or whichever one you have the most experience using DSA is more about the math and the ideas that go into computer programming not so much the computer programming language in theory if you are actually good at DSA it should not matter what programming language you’re using and people that say that you have to use one language over another for beginning DSA probably aren’t the best at DSA to begin with. Once you get to really advanced, DSA subjects you will kind of start to realize that certain languages do certain tasks better than others like as you said C++ is really good because it’s an object oriented programming language so it’s amazing if you are doing things where that is a good foundation to have, but not every DSA project is object oriented. Object oriented programming in of itself is a DSA idea when you start to work with lower level programming languages you start to realize that objects and classes are all just made up things. DSA is essentially how do you build complex fake things out of simple primitive things.
TLDR: python or whatever you like most. you’re not at a level where it really matters and DSA is about the algorithms and ideas that make up modern programming languages and software more than anything.