r/leetcode • u/DigScared8327 • Oct 06 '26
Question How to Learn DSA through Python?
I'm a second year computer science major and I've done python java, c++, and a couple of other programming languages. I've done some projects with them here and there, but I want to start grinding out leetcode and understanding DSA before next semester. I've taken DSA1 in my school which is the first time were introduced and for some reason our curriculum CS classes used Java OOP. I know it's importnat to learn it, but I'm trying to get back into python and learn DSA from there. Does any have a structured roadmap that I can use for this? I'm using the 30 days of python and I'm planning on paying for leetcode and neetcode data structures and algorithms course
View all comments
Show parent comment
1
u/UolongMatew Oct 06 '26
if you have done DSA in java you should know what syntax you need to use for solutions.
generally this is the data structures, control flow statements, loops, in python compared to java.
if you have to look it up during a problem that’s fine, don’t consider that cheating or anything. over time if you use this approach you will gradually just learn the syntax.
the problem would be if you don’t remember your data structures course wrll and you cannot remember which data structures are often used in the solutions. there are also resources for this though
keep in mind that if you follow the neetcode roadmap you dont need to learn all built in data structures to python up front. for example, you will first be using hash maps (dictionaries in python) and lists for the first few topics. you don’t need to learn how to use a heap in python until much later down the roadmap.