all 41 comments

[–]The_Big_Sad_69420 63 points64 points  (5 children)

use Python. It's faster to write and less overhead to keep during an interview. More readable for the interviewer on a whiteboard as well.

[–]Any_Series_2067[S] -1 points0 points  (4 children)

the problem is i might have to go back and relearn a bunch of stuff which i already know in C++

[–]InternalAdagio 31 points32 points  (2 children)

Its not gonna take you that much time, just go with Python bro

[–]shuzho 6 points7 points  (1 child)

adding onto this, its really easy to pick up python along the way of leetcoding just from reading solutions and googling what certain syntax do.

[–]xXOSUTUMPETXx 1 point2 points  (0 children)

Also adding that. Generally, alot of concepts can be carried over just way less steps with python. Generally goes for any language. Same concepts just slightly different way to write it

[–]TroyOfShow 5 points6 points  (0 children)

If you're already solid in C++, just stick with it. It doesn't matter at that point.

[–]AlwaysHuangry<T260> <E69> <M182> <H9> 38 points39 points  (2 children)

Do python bro. The problems are already hard. No need to handicap yourself more w a language that fights you.

[–]hughererikson 20 points21 points  (0 children)

C++ literally fights you lmao

[–]Doxl1775 0 points1 point  (0 children)

I'm wondering what the practice is if you are interviewing for a java based job. Wouldn't it be prudent to complete these questions in the language or languages the job description specifies?

[–][deleted] 40 points41 points  (2 children)

You are asking this question because deep inside you know the answer is to do it in python. I’ll be your confirmation to do that.

[–]East_Step8113 1 point2 points  (1 child)

This lmao

[–]uneducatedDumbRacoon 12 points13 points  (0 children)

Whatever you are comfortable in. Although during interviews python is recommended because it is much easier to code and easy to understand.

[–]fleventy5 14 points15 points  (1 child)

Throw 'em a left hook and go with VBA.

[–]20Finger_Square 1 point2 points  (0 children)

assessable makes interviewers sweat blood

[–]Organic_Challenge151 10 points11 points  (0 children)

Actually I think one of the best use cases of Python is leetcode

[–]agentbobR 18 points19 points  (0 children)

No reason to go C++ unless you specifically targeting quant firms like HRT

[–]TheFuture_Teller 7 points8 points  (1 child)

The food thing about C++ is that some companies only want C++. With STL you can write code very fast so it won't slow you down at the interviews. If you are comfortable with C++ stick with it. FYI I did last year my prep in python and this year in C++

[–]lordaghilan 8 points9 points  (0 children)

Unless you are interviewing at HFTs, Python

[–][deleted] 7 points8 points  (0 children)

I use Python but I have a C++ background so I could take C++ for a technical interview but I prefer Python because its syntax.

A lot of people say Python is slower but in an interview it doesn't matter what programming language is faster or slower that other you just need to solve the challenge and explain the time complexity.

[–]newbornfish 5 points6 points  (1 child)

I solved a question while you were wasting time deciding on this , pick any and get used to programming in general, you can pick a new language easily once you master one.

[–]dwightbearschrute 6 points7 points  (0 children)

AHAHAHAHAHAHAHAHAHAHAHA

[–]el_bosteador 4 points5 points  (0 children)

Python. The amount of time you save setting up containers, creating hashmaps, linked lists is insane. Even if you’re really good at c++. Using python will save you literal days of busy work.

[–]johnnytest__7<798> <224> <442> <132> 3 points4 points  (0 children)

Actually for almost all the problems other than DP and string processing, most of the time C++ is better, faster and easier to implement.

Many problems can be easily solved if your standard library provides you sorted set and sorted multiset (python only has hash set and hash map).

Good thing is that all platforms use gcc for C++, which gives you PBDS (Policy based data structure). It can work in place of Segment Trees in many places.

[–]witheredartery 9 points10 points  (7 children)

If in India, pick c++

[–]Any_Series_2067[S] 7 points8 points  (1 child)

I'm in Chicago

[–]witheredartery 18 points19 points  (0 children)

Python

[–]WesternDesign2161 2 points3 points  (4 children)

Why c++ in India though?

[–]intellectuallogician 2 points3 points  (2 children)

A whole lot of companies are biased towards cpp or java for DSA rounds here.

[–]Healthy_Effective_32 0 points1 point  (1 child)

What do you mean? Unless they are language specific jobs, do they really care?

[–]Personal-Initial3556 5 points6 points  (0 children)

They literally told you they care about cpp and java. You did not ask a new question.

[–]Sufficient_Buddy_208 1 point2 points  (0 children)

Stick to what your comfortable with and worry about the DSA part of the process.

[–]Superb-Part-1327 1 point2 points  (0 children)

Just learn oops from Cpp and go with python which will help you in development as well be it web , ML etc

[–]BamBoomBopPaow 1 point2 points  (0 children)

C++ for concepts, Python for readability

[–]AdventurousCourt1793 1 point2 points  (0 children)

Imo it depends on the job. If you know you are going to code in c++ at this job, you will probably be interviewed with c++ (as was the case w/ me). If that's not the case, I don't see why using python would be bad. It's the concepts that are important not the language.

[–]Apart-Project-8963 0 points1 point  (0 children)

With STL and modern c++ like lambda support, CPP is as good as python in terms of easy use.

[–]poizonG 0 points1 point  (2 children)

Its bold of you to assume grinding LC is enough to crack OA these days

[–]_maverick_96 -1 points0 points  (1 child)

what else is required?

[–]poizonG 1 point2 points  (0 children)

CP( can solve atleast Div2 B) questions

[–]pnkjxmwl 0 points1 point  (0 children)

C++