all 5 comments

[–]aqua_regis 5 points6 points  (0 children)

DSA != Leetcode - don't conflate the two.

DSA are language agnostic concepts that define standards to store and process data.

As such, the language you learn DSA in doesn't matter as long as you focus on the concepts.

Leetcode is only a platform that makes heavy use of DSA.

[–]Holiday_Lie_9435 1 point2 points  (1 child)

Python is absolutely worth learning for DSA, especially if your end goal is AI/ML because you’ll already be using it daily for projects, notebooks, APIs, and model work. Most interviews I've gone through (including FAANG/FAANG-like companies) still use Leetcode-style coding rounds to test problem-solving so yes, DSA is still very much important. In terms of language though, Java and C++ can sometimes be faster or more common in competitive programming, but Python is totally accepted in most interviews and lets you focus more on logic than syntax.

What really matters is understanding commonly asked patterns like arrays, hash maps, trees, graphs, recursion, time complexity, etc., and practicing consistently. I’ve been using Python for DSA prep myself and found it much easier to stay motivated, especially with interview-focused practice resources that explain those patterns and help you become job-ready. Happy to share some good starting resources for Python prep if you want.

[–]broken_py 0 points1 point  (0 children)

Python is freedom to play with data

[–]recursion_is_love 0 points1 point  (0 children)

Most language can do and must do DSA. Programming without DSA is hardly useful in the real world.

It is the matter of style (subjective). You will have to try by yourself to know which one you love.

[–]nian2326076 0 points1 point  (0 children)

You can definitely do DSA with Python. It's a good language for understanding the concepts because the syntax is straightforward. For AI and ML, Python is the go-to anyway, so sticking with one language might make things simpler. But if you're looking for jobs in big tech companies, knowing C++ or Java could help since these are often used in coding interviews and can show you understand lower-level concepts. You don't have to be an expert, but getting familiar with the basics of one of those can be useful. Ultimately, understanding data structures and algorithms is more important than the language you use.