I am planning to attend interviews at Google, Facebook, Amazon and few others in about 6 months. Any inputs on programming language to use? I use C# at work. I am better at recognizing some algorithms or data structures to use for the problem but where I have trouble is implementing it correctly without mistakes in less time. I am currently using C# for practicing. I use C# at work but the kind of work I do doesn't have the need for much use of C# capabilities that are needed for interview problems. I read online that using Python may be better because of its brevity and the support for data structures like maxheap which C# doesn't have. With Python, you can just focus on the logic rather than dealing with all the verbose statement C# has. But the thought of doing a silly syntax mistake or missing some obvious trick during interview is scaring me. This makes me believe that the statement that "pick the language which you are most comfortable in" is not true. I am comfortable in C# but it takes so long to code the logic I have in mind and when I look at python code, its half the length. I however haven't learnt Python yet properly. I am open to learning it if it will help. If I practice using Python, will it be ok for interviews at Amazon? Please suggest. Also, do people look down if you use python and consider that you don’t know coding? I have read this at multiple places. And I do not agree that language of choice does not matter. I had used C# in the recent Google interview and one of the interviewer asked me something with IEnumerable and the question did not made sense. He even copied some sample code to show me interface for IEnumerable and said that I don’t know much about C#. It looked like he just did a google search, picked one concept and then tried to fit a coding problem in a very weird way. The question seemed unfair for interviews. Python has less boilerplate code, means more time to think or more manageable code on the whiteboard or even on text editor which a lot of companies are giving the option nowadays. I also noticed during my phone screen, the expectation was that you write the code and compile and show the result if you have finished the code. I got a callback where I compiled and had the result in a day. Few places where I just wrote the code, took a week to reply back with positive answer. I can learn python as I have 6 months. Will it be better to learn python and practice interview questions or its better to use my time to practice more coding question in C# as I have been doing up until now. Has anybody faced the same problem and switched to python and seen a different outcome in loops yet? #leetcode #interview #interviewquestions
Use what you know best. Learn python for backup
C#
I am in the same boat and decided to learn Python. I found it easier.
I was in a similar situation for my last interview prep. I was a functional Scala dev for the startups, then I decided to join a big corp. I decided not to use Scala for the interviews because the majority of problems are expected to be solved imperatively, it also gets complicated to analyze the memory complexity of the persistent data structures, etc. I decided to use python for the interviews although previously just used it for scripting/plumbing. Pros: - Allows to express a lot of ideas much easier. It has a few basic data structures that can be used to solve a variety of problems. - Python code looks very similar to pseudo code, so it’s very easy to write and also read from the whiteboard. - Very easy to pick up/refresh for the interviews. Took me 5 days 2 hours a day to review everything to feel comfortable. Cons: - Some people do judge you when you use it. It is somewhat justified because python is very high level. You end up missing out on thinking about some problems where the gory details are important. - No static typing, so you could potentially eat shit a couple of times, confusing yourself. - Overall the language is a bit of an incoherent mess but this is just my personal opinion. I recommend that you use something that is 1) not verbose 2) statically typed 3) has a rich std You don’t have to go with these dinosaur languages everyone is using. Have some fun by trying one of the cool new ones, e.g: Kotlin, Rust, F#.
Thanks for the helpful response. The list of Pros which you have mentioned is what exactly made me think about python. If you had to choose again a language for interviews...will you be choosing python again?
I don’t think I’d be going with python. I’ve been working with JVM based languages for much longer now and I am much more proficient in them. I’d go with Java or Kotlin.
MIX
Use what you know best , especially will help you if they are going to ask domain specific questions about how the language and environment works
Find out what language you’ll be using there and use that. The folks who are looking for “signal” on coding will have more confidence that it’s there if you use a language they’re familiar with.
Every company accept an interview in Java and it’s relatively close. Also, you could have said “I code in C# and don’t know what language to use in an interview. Advice?” Would have saved us both a lot of time.
Python can be good, it’s concise and easy to work with. I’ve used it and other languages like Groovy, Kotlin, and Swift in interviews (depending on context). Mainly it’s about using languages you LIKE to work in. It won’t matter what the benefits are if you don’t like it or can’t remember it. Also, sometimes certain languages fit certain questions better. Or atleast people will have an easier time in some languages than others. I think sometimes the “looking down” on a language it necessarily from the language it self but from some languages having a lot of helpers and shortcuts that make some solutions super easy. This can happen in Python, it’s easy to make some solutions one-liners. Where as in something like java you might have to break out a for loop some data structures blah blah blah. Personally, I sometimes ask the interviewer if they are ok with the super concise answer or if they would like me to implement the longer more explicit version.
U really are used to verbosely expressing what can be done in a few lines. Lol such a wall of text for a simple question. I would say stick to language u can code in. If u have enough time, go ahead and give python a try. But imagine how foolish u will feel if u make silly mistakes cuz u weren't familiar with some quirk of a language u decides to use.
😂 op needs to give a tldr
The whole point of writing the entire post is that if anybody else dealt with the same trouble I am dealing with. Learning a new language is easy but coding the entire thing in about 20 min takes practice. And this takes time. I want to know if people here did the switch when they did face this problem and was it a better choice.