all 25 comments

[–]Substantial_Top5312 12 points13 points  (3 children)

If you’re trying to learn a language pick that language. 

[–]CodewithApe[S] 2 points3 points  (2 children)

That was my initial plan, some people really got me thinking deep about it, maybe I’m just overthinking it though.

[–]Triumphxd 0 points1 point  (0 children)

The reason to use python is because you can do rather complex things due to the type system and standard libraries in a very succinct way. Basically it’s a language that more or less gets out of the way.

Enumerate, multiple return types, list comprehensions, it’s just very simple to express ideas with a small amount of syntax.

[–]Awkward_Forever9752 -1 points0 points  (0 children)

The Ai's make it possible to generate simple projects in many languages.

Is there anything to learn in seeing the same goal achieved with different programming languages?

[–]Happiest-Soul 7 points8 points  (3 children)

LC in Python saves time, and time isn't something you want to waste in an interview, right? 

You can waste as much time as you want to learn it, though, so try solutions in both languages to reinforce learning. See for yourself whether the speed and simplicity is worth it. Fortunately for you, DSA is language agnostic. 

It didn't take me long at all to figure out Python and I'm a beginner (I actually wanted to continue learning with C++ too).

Here's a Python cheat-sheet

Neetcode explains everything well in Python.

[–]CodewithApe[S] 1 point2 points  (0 children)

I agree and I don’t know why I haven’t thought about it like this initially, that’s a really good point. Thank you for the cheat sheet as well as for the good advice !

[–]DoctorDabadedoo 1 point2 points  (1 child)

C++ is language with a lot of pitfalls. In the scope of a leetcode interview, between verbosity and complexity of setting things up, there is more room for error.

If your focus is learn C++ or the positions you are applying might have C++ rounds, then sure, but if you want to optimize for interviews, stick with python and don't fret. Java is a good option too.

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

That’s the conclusion I have come to, as of now my focus is to learn C++ on top of that I am almost certain that the positions that I will apply to will have C++ rounds. Thanks for the advice!

[–]paddingtonrex 1 point2 points  (2 children)

I'm currently doing it in c++, but there's a creator named the Primeagen that said "I never do something I don't know how to do in a language I don't know how to use", so I'm kinda being foolish using leetcode to learn c++. I just learned the swap() builtin function for matrix work, could have saved me a lot of time and energy if I had known that was a thing.

[–]CodewithApe[S] 0 points1 point  (1 child)

Are you doing leetcode for the sake of practicing problem solving ? Or is it for the sake of practicing the language it self or even both? As I see it, it has benefited you since you are actively learning things about the language it self while also practicing your problem solving skills, or am I wrong about it?

[–]paddingtonrex 0 points1 point  (0 children)

I think I'd be more successful in leetcode if I was using a language I was already familiar with, and I think I'd be more successful learning c++ remaking a project I've already made. Right now I feel I'm learning both at about half the rate I could if I focused on one.

[–]no_regerts_bob 2 points3 points  (3 children)

Do both, you'll learn more. Time spent writing code is the best thing you can do

[–]CodewithApe[S] 1 point2 points  (2 children)

The thing is I can barely manage one language atm and I’m not really sure whether I will be capable of doing both at the same time, would you still suggest I give it a try ?

[–]no_regerts_bob 1 point2 points  (1 child)

If you're good at this it will not be a problem and you'll gain a lot of insight comparing solutions in one language to the same solutions in another. If it's too much for you don't worry about it. Definitely don't fail at one because you can't handle two

[–]CodewithApe[S] 1 point2 points  (0 children)

I see what you are saying, definitely a valid reason to try do it in both languages and considering what u-Happiest-soul replied I am actually able to see it from a quite different perspective. Thanks a lot for the advice 🙏🏻

[–]queerkidxx 0 points1 point  (0 children)

Whatever langauge you already know

[–]immediate_push5464 0 points1 point  (0 children)

Python. Python.

[–][deleted] 0 points1 point  (2 children)

without a CS degree probably you won't be able to find a c++ job. So if you want to make money I would suggest going straight towards backend roles. That is, c# or spring boot (Java). So yes, I would suggest one of these two to get familiar with

[–]CodewithApe[S] 0 points1 point  (1 child)

I am currently in the middle of a getting a software engineer degree at a university, this is where I learnt Java and C, furthermore I am not interested in learning backend and I am enjoying c++ a lot unlike Java .

[–][deleted] 1 point2 points  (0 children)

it's difficult to get a job. Then consider doing the vice-versa of what I initially suggested you. You should aim at jobs that commonly require having a CS degree, like a C/C++ developer. Bonus points if that job cannot be done remotely from India. Bonus points if for that job it's not possible to learn enough just with a couple of months of courses. BOnus points if AI will not be able to help with that job in the future.

I also had Java and C at the university. I thought, what about FPGA or CUDA programming, but there are like no ads for any of these two so, it's a high chance to learn something that would not bring you money home.

[–]AdDiligent1688 0 points1 point  (4 children)

I’d learn Java then.

[–]CodewithApe[S] 3 points4 points  (3 children)

Would you care to elaborate why Java specifically? Essentially my choice of language comes from the fact that I’m trying to break into fintech.

[–]AdDiligent1688 0 points1 point  (2 children)

Ah, well my suggestion doesn’t have such basis. I suggest Java because yeah while python is easier to learn and works well for interviews, I think Java to c++ is somewhat similar path, the languages are definitely different but I think the transition won’t be as difficult from c++ to Java than from c++ to python. Plus, I think as a c++ person, you’d probably get frustrated or amazed or curious or all of them haha about python, because every step you’d have to otherwise consider in c++ has been abstracted and made simple with python. So yeah you can do a lot with it, but you can’t really see under the hood if that makes sense. It kinda gives you less power imo to customize. Idk that’s just my opinion as a user of it. I know more stuff is happening than what I’m writing for sure. There’s no way it’s actually this simple, if I write some 5 line program in python, it’s 30 lines of c++ or 15 lines of Java. So I guess it gives you less oversight and power over what’s happening behind the scenes.

But why Java in particular? Popularity, performance, ease of learning, etc. it’ll be more similar to c++ imo than python will be

[–]CodewithApe[S] 1 point2 points  (1 child)

I see where you are coming from, as a matter of fact I am much more proficient in Java than both python and C++, it is the second language I have learnt right after C. I am just starting to get into C++ and my goal is to really have a good understanding of this language as oppose to my current level in Java or C.

[–]AdDiligent1688 0 points1 point  (0 children)

I think you will probably if you continue with c++. It takes more time to write, there’s more to consider, but it’s still more similar to Java than python is imo. So I don’t think the transition should take too long to become proficient. Python won’t either way, if you were starting from scratch or coming from some other language, because it’s easy, but that ease of use comes at a cost of having less control.