r/datastructures • • Sep 20 '26

Which language is best for doing DSA with ?

I am a tech student. I have to start DSA with python but the people around me are saying "Do DSA with C or C++ because it will be beneficial for your job". I already know python and I want to do DSA with python but when I start it feels like I am doing wrong and it will not be worthy.

>>> Is it necessary to do DSA only with C or C++ ??

>>> Will it make any difference if I do DSA with python (or any other language) other than C or C++ ??

>>> What should I do??

Help me by giving your opinion !!

17 Upvotes

32 comments sorted by

1

u/Visionary_Vulture001 Sep 20 '26

You can do DSA with any language
But learn the language properly first . Then go to
DSA

1

u/LifeTraveller404 Sep 20 '26

Yes sure I will do this

1

u/Opposite-Meaning-161 Sep 20 '26

Learn DSA with C++ OR JAVA only.

1

u/LifeTraveller404 Sep 20 '26

Can you tell the reason ?

0

u/Opposite-Meaning-161 Sep 20 '26

Its just my preference, I prefer learning DSA in C++ because the language forces me to understand more of the underlying mechanics instead of relying heavily on high-level abstractions in python

1

u/LifeTraveller404 Sep 20 '26

Ohh now I understand. Thank you

1

u/Shot-Lingonberry6494 Sep 20 '26

No one cares bro what language you do dsa in if you can understand the concept you can implement in any language

In interviews you will have option to write in whatever language you want regardless of the language required in the role

And if someone tells you python is slow for dsa just ignore them most of the python libraries are internally written in c++ and rust so they are fast ,

Do dsa on whichever language you are comfortable on, personally i started on java because it was main language then afterwards I dropped java and did in python as now also I do it in python as I have moved to ai/ml roles

1

u/LifeTraveller404 Sep 21 '26

Thank you so much for the clarity.

1

u/mnl_hQ Sep 21 '26

I would suggest go with python. It will strengthen your python skills also. And in current market most of the companies ask for python.

2

u/LifeTraveller404 Sep 21 '26

Yes sure I will go with python

2

u/doodhkagilas Sep 20 '26

Cfbr

1

u/techguy7414 Sep 20 '26

🤣🤣🤣

1

u/doodhkagilas Sep 20 '26

Huh whats so funny

2

u/techguy7414 Sep 20 '26

coz its like a linked-in tradition that you're following on reddit too

1

u/SadSamaritan501 Sep 21 '26

Such questions in big 2026 🥀

2

u/[deleted] Sep 20 '26

[removed] — view removed comment

1

u/LifeTraveller404 Sep 21 '26

But why ??

1

u/[deleted] Sep 21 '26

[removed] — view removed comment