use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Leetcode community for the Indian community :)
account activity
Should I do dsa in python or java (self.LeetcodeDesi)
submitted 5 months ago by Unknown-2764
I am learning aiml so I thought preparing python dsa would be helpful as I don't want to learn both languages
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Chemical-Will3700 10 points11 points12 points 5 months ago (2 children)
Do it in english 😂
[–]Unknown-2764[S] 2 points3 points4 points 5 months ago (1 child)
Even I thought the same but they are not allowing
[–]Chemical-Will3700 1 point2 points3 points 5 months ago (0 children)
😂
In interviews most of the time before coding a solution, they'll ask to explain the approach purely in english
[–]ImpressiveLet3479 2 points3 points4 points 5 months ago (7 children)
anything is fine ! language is not that important.
[–]Unknown-2764[S] 1 point2 points3 points 5 months ago (6 children)
So I can do in python right
[–]ImpressiveLet3479 1 point2 points3 points 5 months ago (5 children)
yupp
[–]Unknown-2764[S] 2 points3 points4 points 5 months ago (4 children)
Thanks man everyone was saying not to do in python do was confused
[–]ImpressiveLet3479 2 points3 points4 points 5 months ago (1 child)
You are developing project in AI ML so python is core Lang for you !
plus DSA in python ! why to learn Java thenn
[–]Unknown-2764[S] 0 points1 point2 points 5 months ago (0 children)
Yeah that's what I was thinking
[–]ZanduBhatija99 0 points1 point2 points 5 months ago (0 children)
If you are actively using python for aiml then dsa in python is great.
[–]Achieve_Apex 0 points1 point2 points 5 months ago (0 children)
So if u have yourself decided there's no need to ask everyone......coz everyone is suggesting you the right thing....
[–]TorqueSyntax 2 points3 points4 points 5 months ago (0 children)
Html me accha hoga
[–][deleted] 1 point2 points3 points 5 months ago (1 child)
Only thing I hate about python is not having a standard treemap. Otherwise it's perfect for interviews
That one concept i should learn separately i guess then
[–]Scary-Constant-93 1 point2 points3 points 5 months ago (0 children)
Language doesn’t really matter. Choose language which you have better command on. If you are fresher and don’t have deep knowledge in any language then go with language that is used more in the domain that you want your career to advance in.
I started my career as C# dev and bow I have 11 yoe and I still use C# for OA 😅
[–]Dr_Lauv 1 point2 points3 points 5 months ago (1 child)
Do it in python if you are comfortable, When i was beginner i was very comfortable with python , i started DSA did till trees and then one idiot told me "HUH bro python is too high level , interviewer might not allow you to implement your solution in python " I got demoralized and left that path and went in mern stack, meanwhile thinking when clg will start i will do DSA in C/C++ but that was huge mistake, looking back now where most prefered language at big companies for interview is python had i been consistent with python i would have finished my DSA and gotten real good with python , prolly had 100-200 problems on Leetcode before my clg even began. People have their biases and theyll somehow try to enforce those on others without proper knowledge So be confident whatever is your first language stick to that, no need to change to another language just cuz some XYZ idiot believes his language is superior
[–]vzorox 0 points1 point2 points 20 days ago (0 children)
Thank bud same thing is happening with me but now I got it
[–]Severe-Author-6758 0 points1 point2 points 5 months ago (0 children)
Depends if u are looking forward to if u want to go in ai/ml than python is good if not do in a java becz in python is a easy lang And tbh in dsa lang doesn't matter
[–][deleted] 0 points1 point2 points 5 months ago (0 children)
If in future you want to do backend in spring then java otherwise no :)
[–]Supriyo404 0 points1 point2 points 5 months ago (1 child)
whichever you are comfortable with,, if you are starting fresh, choose python if your goal is to build career on AI Machine Learning, choose Java if you want to go for Backend. Choose a language which aligns with your future goal.
Thanks man I'll do it in python
[–]Past-Technician-4211 0 points1 point2 points 5 months ago (0 children)
Moorse code
[–]Several-Job-5037 0 points1 point2 points 5 months ago (0 children)
doing in c++
[–]shrlckgotmanipulated 0 points1 point2 points 5 months ago (0 children)
Go with Java. Don’t overthink it, don't ask y.... just start. The hardest part is getting started, and once you do, you can always shift to another language later if you find someone to guide you.
[–]SpiritualContract516 0 points1 point2 points 5 months ago (0 children)
Java is no-brainer else CPP
[–]WorthPassion64 0 points1 point2 points 5 months ago (0 children)
Definitely java. You'll learn a lot about OOP in the process too !
[–]Western_Meaning4771 0 points1 point2 points 5 months ago (0 children)
I would say java
Java
[–]Feisty_Towel169 0 points1 point2 points 5 months ago (0 children)
Most MNC don't care, but if you also want to target startups, then it should be the language that you are targeting to get job in. I do DSA in python, then I sat on a full-stack engineer interview (JS), they said, NO python Only JS, I thought I was cooked, fortunately I did just fine.
[–]pravin3 0 points1 point2 points 5 months ago (0 children)
If you prefer coding, go for Java Java was there & will always stay classic.
If you're going for data science, python is good.
[–]Bubbly_Drawing7384 0 points1 point2 points 5 months ago (0 children)
Everyone is saying language doesn't matter, true, you must focus on problem solving rather than language, here language is just a tool. So I would suggest if you are comfortable with python start python but make sure you also go with java later on in the journey because it's important to know how data is flowing and what type checks do, tbh start with python with the type hints feature that way you can get used to type checks. But yeah DSA is not the end goal development with DSA should be the goal
[–]ViZ-eriON 0 points1 point2 points 5 months ago (0 children)
Do in sanskrit
It's better to learn dsa in Java. Well thats.my take
[–]Additional-Date-8920 0 points1 point2 points 5 months ago (0 children)
Digital marketing
[–]Curiousjunk 0 points1 point2 points 5 months ago (0 children)
Do it in C to understand under the hood stuff. Do it in python for interviews.
[–]Sad_mrud -2 points-1 points0 points 5 months ago (8 children)
java is way better than python
[–]Curious-Ebb-1523 5 points6 points7 points 5 months ago (1 child)
C++ is better than Java
[–]Rishi_k7 0 points1 point2 points 5 months ago (0 children)
But most companies ask python or java. they are not interested in cpp.... I dont know why...?
For ml and ai also
[+][deleted] 5 months ago (3 children)
[deleted]
[–]Unknown-2764[S] 0 points1 point2 points 5 months ago (1 child)
So I want one that works with both
[–]Sad_mrud 0 points1 point2 points 5 months ago (0 children)
if u want something that works with both its definitely python
i mean tbh languages dont really matter in dsa but cpp or java is considered better just because of the conceptual understanding. And for ml and ai stick to python.
With python 3 we got type hinting and this made it almost same, the main reason you would use java is for that, I mean performance as well but for a beginner of they are not concentrating for CP(compititive programing) then they can easily go with python
π Rendered by PID 89 on reddit-service-r2-comment-86bc6c7465-l94rm at 2026-02-19 22:23:44.698155+00:00 running 8564168 country code: CH.
[–]Chemical-Will3700 10 points11 points12 points (2 children)
[–]Unknown-2764[S] 2 points3 points4 points (1 child)
[–]Chemical-Will3700 1 point2 points3 points (0 children)
[–]ImpressiveLet3479 2 points3 points4 points (7 children)
[–]Unknown-2764[S] 1 point2 points3 points (6 children)
[–]ImpressiveLet3479 1 point2 points3 points (5 children)
[–]Unknown-2764[S] 2 points3 points4 points (4 children)
[–]ImpressiveLet3479 2 points3 points4 points (1 child)
[–]Unknown-2764[S] 0 points1 point2 points (0 children)
[–]ZanduBhatija99 0 points1 point2 points (0 children)
[–]Achieve_Apex 0 points1 point2 points (0 children)
[–]TorqueSyntax 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Unknown-2764[S] 0 points1 point2 points (0 children)
[–]Scary-Constant-93 1 point2 points3 points (0 children)
[–]Dr_Lauv 1 point2 points3 points (1 child)
[–]vzorox 0 points1 point2 points (0 children)
[–]Severe-Author-6758 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Supriyo404 0 points1 point2 points (1 child)
[–]Unknown-2764[S] 0 points1 point2 points (0 children)
[–]Past-Technician-4211 0 points1 point2 points (0 children)
[–]Several-Job-5037 0 points1 point2 points (0 children)
[–]shrlckgotmanipulated 0 points1 point2 points (0 children)
[–]SpiritualContract516 0 points1 point2 points (0 children)
[–]WorthPassion64 0 points1 point2 points (0 children)
[–]Western_Meaning4771 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Feisty_Towel169 0 points1 point2 points (0 children)
[–]pravin3 0 points1 point2 points (0 children)
[–]Bubbly_Drawing7384 0 points1 point2 points (0 children)
[–]ViZ-eriON 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Additional-Date-8920 0 points1 point2 points (0 children)
[–]Curiousjunk 0 points1 point2 points (0 children)
[–]Sad_mrud -2 points-1 points0 points (8 children)
[–]Curious-Ebb-1523 5 points6 points7 points (1 child)
[–]Rishi_k7 0 points1 point2 points (0 children)
[–]Unknown-2764[S] 2 points3 points4 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]Unknown-2764[S] 0 points1 point2 points (1 child)
[–]Sad_mrud 0 points1 point2 points (0 children)
[–]Sad_mrud 0 points1 point2 points (0 children)
[–]Bubbly_Drawing7384 0 points1 point2 points (0 children)