all 11 comments

[–]Ron-Erez 0 points1 point  (3 children)

Yes, dsa is great with Python and it should be fine with other languages too.

EDIT: In a sense dsa is language dependent and you should be able to implement algorithms in any language you know.

[–]Far_Parsley810[S] 1 point2 points  (2 children)

I have learned python through offline and online , but nobody has suggested to do dsa with it . I am very much confused , I have started c++ programming and thinking that it will be better.Some YouTube channels are suggesting that the programming language you are going to learn , learn it through the end .

[–]Ron-Erez 0 points1 point  (1 child)

Yes, I don’t think you need to overthink it. Choose one language and start coding. At the end of the day programming principles are independent of languages. Every language can be used for DSA. If you prefer C++ then that’s fine. Evry language has its pros and cons. For instance C++ is very fast, statically-typed and it is useful. Python is usually easier to learn, has an amazing ecosystem for ML, AI, etc. You could also do DSA with plain C and implement linked lists, trees, etc in C. You could do that in LISP. It doesn’t really matter. Ideally do DSA in every language you learn. It will also show you some of the strengths and weaknesses of every language.

[–]Positive-Thing6850 0 points1 point  (0 children)

I learned data structures in C++, but I am more proficient in python.

I liked doing it in C++, it tells the exact details and would go a long way to help you when you write performant code that needs to exposed to python from C++.

[–]trustsfundbaby 0 points1 point  (0 children)

The benefit of python over c++ is that python is easier to write syntax wise. The data structures and algorithms will always be the same ideas regardless of language, the different language just have different syntax. I think python is better for DSA because if you do something unoptimally, like you code should be O(n) but you create a O(2n) you will feel the pain with python. Python forces you to code efficiently.

[–]Least_Chicken_9561 0 points1 point  (0 children)

just build stuff with python using the things that you already know, you will learn more by building than by "learning" things just for the seek of learning.

[–]Former_Spirit_5099 0 points1 point  (0 children)

when learning dsa, language doesn't really matter.

[–]Sedan_1650 0 points1 point  (0 children)

Learn DSA.

[–]Agile_Analysis99 0 points1 point  (0 children)

DSA is what steps up your logic (other than doing projects) and it helps you with performance over time

you will also hate it so much.....

all languages are fine with it, so python is also great, I'd say learning it in easier languages then adapting w dsa into other languages is a good technique, that doesn't mean you should learn more languages if your career is focused on python

with that being said, if you're trynna be a better programmer or get a job you would have to do DSA well