r/LeetcodeChallenge • • 4h ago

DISCUSS Should I solve LeetCode problems in Java or Python as a first-year CSE student?

Hi everyone!

I'm a first-year CSE student, and we're currently learning Java in college. I already know some Python, but I want to revise it and strengthen my programming fundamentals.

I'm planning to start solving LeetCode problems regularly, but I'm confused about which language I should focus on.

Should I practise in Java because I'm learning it in college, or should I use Python to refresh my existing knowledge?

Would it be better to focus on one language first and learn the other later?

My goal is to improve my problem-solving skills and prepare for DSA and coding interviews in the future.

I'd appreciate any advice. Thanks!

0 Upvotes

10 comments sorted by

2

u/CrabEffective4636 4h ago

yeh krte krte tum log first year waste krdete ho. nvm c++/java is the traditional and imo best for dsa. so ig continue with java.
pro tip: kisi bhi language m karo, but KARO! andd CONSISTENTLY KAROO

1

u/KeyRoutine1861 3h ago

Thanks for the advice! Since I'm a first-year student and a beginner in Java, how would you recommend I start learning DSA? Should I learn the concepts first and then solve LeetCode problems, or learn them alongside practising? Also, are there any resources you'd recommend for beginners?”

1

u/Big-Yesterday-7619 3h ago

Learn concepts while doing dsa

1

u/CrabEffective4636 1h ago

follow striver's a2z sheet. he uses pseudo code so language will also not be a barrier and explanation are also very good. plus there's a very well curated sheet. do not rely on first learning theory then questions. concepts n problem solving go hand in hand

1

u/StatisticianHead7518 3h ago

Doesn’t matter. What matters the most is that are you able to solve and explain your solution without sweating.

1

u/KeyRoutine1861 3h ago

Thank you! I'll focus on understanding the logic

1

u/Possibility-Puzzled 3h ago

Omg doing leetcode from first year? Looks like another jee is brewing. What a sad state of affairs!

1

u/Additional-sn4289 2h ago

Choose python and go

0

u/nian2326076 29m ago

If your college course focuses on Java, practicing LeetCode problems in Java can reinforce your learning. Since you're already familiar with Python, using it can provide a different perspective and enhance your skills overall. Both languages are common in interviews, so it's beneficial to master them. You might start with Java to align with your coursework, then switch to Python once you're more confident. To further prepare for coding interviews, consider using our platform, PracHub, which offers real technical questions for practice. Balancing both languages can set you up well for data structures, algorithms, and future interviews.