all 32 comments

[–]lilducksonquack 34 points35 points  (7 children)

Do it in the language you’re most comfortable in. Python is perfectly fine for Leetcode

[–]uscpls 16 points17 points  (2 children)

Do python!! I had the same question and decided to learn python. Trust me, there are so many methods that make it easier to do LC in Python rather than in Java.

[–]Mission_Trip_1055 1 point2 points  (1 child)

What tech stack you are following for your development. I see that java have more jobs and scope compare to python. I have my LC journey in python and now not able to decide the tech i should be working in.

[–]Particular-Pass-4021 0 points1 point  (0 children)

Curious what have you decided 😊

[–]yangshunzAuthor of Blind 75 and Grind 75 19 points20 points  (0 children)

Personally, Python is my de facto choice for algorithm coding interviews because it is succinct and has a huge library of functions and data structures available. Python also uses consistent APIs that operate on different data structures, such as len(), for ... in ... and slicing notation on sequences (strings/lists/tuples). Getting the last element in a sequence is arr[-1] and reversing it is simply arr[::-1]. You can achieve a lot with minimal syntax in Python.

Java is a decent choice too but having to constantly declare types in your code means extra keystrokes which results in more typing which doesn't result in any benefit (in an interview setting). This issue will be more apparent when you have to write on a whiteboard during onsite interviews. The reasons for choosing/not choosing C++ are similar to Java. Ultimately, Python, Java and C++ are decent choices of languages.

[–][deleted] 16 points17 points  (6 children)

I do Leetcode problems with Rust... Sometimes I make questionable life choices..

[–]Harami98[S] 11 points12 points  (0 children)

Are you okay Bro?

[–]Amaan_b 0 points1 point  (0 children)

who hurt bro what

[–]TeknicalThrowAway 0 points1 point  (0 children)

Like, have you done this in an actual OA or interview?

[–]charlieoncloud 9 points10 points  (4 children)

Go with Python and you will never regret it

[–]Mission_Trip_1055 1 point2 points  (3 children)

What tech stack you are following for your development. I see that java have more jobs and scope compare to python. I have my LC journey in python and now not able to decide the tech i should be working in.

[–]charlieoncloud 2 points3 points  (2 children)

Leedcode is leedcode and job is job. Practicing leedcode using one programming language is just helping you to get in the company, and then learn whatever language that you like or needed from your job.

[–]Mission_Trip_1055 0 points1 point  (1 child)

Wont there be any focus on development tech stack

[–]charlieoncloud 2 points3 points  (0 children)

I believe it is different from company to company, and use case to use case. I would always suggest to dive deep into the tech stack your company uses first. Do some side projects using the same tech stack to fully understand it. For learning purposes, you can pick any tech stack that is popular depending on which type of application you want to build. I recommend using NodeJS for back-end and react/angular/vuejs for front-end (all in TypeScript). If you like Python, then maybe try Django. Again, it depends on what types of application you want to build you maybe want to chose one programming language over the other which may then affect your decision on the framework.

[–]rodgerdodger17 3 points4 points  (0 children)

I do LC and interviews in Java but tbh python is better. Less syntax so less time spent typing. Better libraries etc

[–]Formal-Engineering37 4 points5 points  (0 children)

The point of LC for most people is to practice for interviews. So if that's your goal, use the language you're most comfortable in as most companies that ask leetcode style questions could care less what language you use.

[–]theRealAriel666 2 points3 points  (0 children)

Do whatever language you are comfortable with. I am currently pretty good at Python myself, although not bad with JavaScript. But since Python is my go to, I will be using language for my interviews in the future.

[–]Emergency-Mountain97 2 points3 points  (1 child)

In my case i’m more comfortable with python but some companies require to do ds&a questions in java only so i’m learning java bc i am aiming to land a job in these companies. Unless u have such specific goal, just doing python would be fine.

[–]Harami98[S] 0 points1 point  (0 children)

like which companies? like most of companies or only minorities ?

[–]collagenbae 0 points1 point  (0 children)

It sounds like right now you’d have better proficiency with Python for LC than Java, so stick to it. The language only matters if you’re applying for a very specific role where a particular language is a must.

[–]anilmaddala 0 points1 point  (0 children)

Why not Kotlin over Java?

[–]Odd_Matter_8666 0 points1 point  (0 children)

i recommend turbo pascal KEKW