--- id: programming-languages-for-coding-interviews title: Which programming language to use for coding interviews description: Considerations for deciding which programming language to use for coding interviews keywords: [ coding interview programming language, which programming language should i use for coding interviews, python coding interviews, java coding interviews, c# coding interviews, javascript coding interviews, ] sidebar_label: Picking a programming language ---
import InDocAd from './\_components/InDocAd'; Does the programming language you use for coding interviews matter? The answer is yes. Most companies let you code in any language you want - the only exception I know being Google, where they only allow candidates to pick from Java, C++, JavaScript or Python for their algorithmic coding interviews. However, the choice you make can impact your performance much more than you'd like to believe - and this is why it is important to pick a suitable programming language early on in your coding interview preparation - and use regularly in practice. There are 3 considerations when deciding on which programming language to use: 1. Suitability for interviews 1. Your familiarity with the language 1. Exceptions ## 1. Suitability for interviews Some languages are just more suited for interviews - higher level languages like Python or Java provide standard library functions and data structures which allow you to translate solution to code more easily. From my experience as an interviewer, most candidates pick Python or Java. Other commonly seen languages include JavaScript, Ruby and C++. I would absolutely avoid lower level languages like C or Go, simply because they lack many standard library functions and data structures and some may require manual memory management. 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. - Recommended: Python, C++, Java, JavaScript - Acceptable (but prefer recommended if you are familiar): Go, Ruby, PHP, C#, Swift, Kotlin - Avoid: Haskell, Erlang, Perl, C, Matlab - You must be mad: Brainfuck, Assembly