Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Tech Interview Preparation  Module 6 – Live coding and practical rounds

Choosing and preparing your interview language

Choose a language for coding rounds by fluency, safety and what the employer allows, then drill the standard-library tools rounds use, shown in 13 languages.

Free intro, Pro: 2 of 10 minutes free
Free: Three tests choose the language: fluency, safety and the allowed list. With a pass: the other 8 sections and 3 interview answers, about 8 minutes.

What you will learn

  • Choose a language using your fluency, its safety and the employer's allowed list
  • Use the standard-library tools rounds lean on: a comparator, a heap, a map and a deque
  • Write correct code in a plain editor, without autocomplete
  • Check the language version a platform runs before you rely on a new feature

Before you start

What you’ll learn · Before you start

What you will learn

  • Choose a language using your fluency, its safety and the employer's allowed list
  • Use the standard-library tools rounds lean on: a comparator, a heap, a map and a deque
  • Write correct code in a plain editor, without autocomplete
  • Check the language version a platform runs before you rely on a new feature

Before you start

On this page

Most employers let you choose the language of a coding round, and the choice is really made in the weeks of practice before it. Meta’s guide advises practising in the language you are most confident in, notes that scripting languages tend to be easier in interviews, and says to stick with a language you are comfortable with rather than learn a new one. Some rounds fix it: Amazon’s front-end assessment requires JavaScript, and TCS CodeVita Season 14 allows only C, C++, Java and Python.

Three tests settle the choice: fluency, safety and the allowed list. Preparing your interview language then takes the weeks before the round, until its standard library is reflex in a plain editor, on the version the platform runs.

Three tests choose the language: fluency, safety and the allowed list

Choosing comes down to three tests, applied in this order:

  1. Fluency: the language in which you have solved the most problems recently, quickly and without looking things up.
  2. Safety: how little the language punishes the slips a round makes likely, such as integer overflow or a missing heap.
  3. The allowed list: whether the round’s platform offers the language, and at which version.

The allowed list is usually long. Amazon’s SDE II assessment says you should be familiar with the syntax of a language such as C, C++, C++14, C#, Go, Java7, Java8, JavaScript, Kotlin, Objective-C, PyPy2, PyPy3, Python2, Python3, Ruby, Scala or Swift, and Atlassian’s coding interviews let you choose the language you work in. Choosing a language you would have to learn first fails the fluency test whatever its other merits. Answer three questions about your own round, and the table marks what fits:

Interactive · answer and compare Which language should you interview in? Answer three questions about your round. The table marks the choices that fit and says why the others do not.
Does the round require one language?
Where has most of your recent practice been?
How long is it until the round?

Answer the questions above: the table then marks what fits your case and says why the rest does not.

Four choices of interview language against fluency, safety and the employer's allowed list
Choice Fluency Safety Allowed list
Your strongest language Good where you have solved the most problems recently, at speed Mixed know its traps, such as integer overflow and any missing tools Mixed check the invitation, and the version the platform runs
A scripting language you know Mixed only as fluent as your practice in it Good short code, and in Python no integer overflow Good Python is on every list quoted in this lesson
The language the round requires Mixed as fluent as the weeks you give it before the round Mixed drill its traps, since you cannot avoid them Good required, as JavaScript is in Amazon's front-end assessment
A language learned for the round Poor weeks of practice are not enough for its library to become reflex Poor its traps are the ones you have not met yet Mixed only if the list has it, at the version you learned
How the answers decide
  • “Does the round require one language?” Yes, it names one: rules out Your strongest language, A scripting language you know and A language learned for the round. The round names one language, so that is the one to prepare, traps first.
  • “Does the round require one language?” No, I may choose: rules out The language the round requires. Nothing is required, so choose by fluency first and safety second.
  • “Where has most of your recent practice been?” Spread over several: adds a caveat to Your strongest language and A scripting language you know. Pick the one with the most recent problems and keep all practice in it from now on.
  • “How long is it until the round?” A few weeks: rules out A language learned for the round. A language learned in a few weeks will not be fluent by the round; Meta's guide says to stick with one you are comfortable with.

For most candidates the answer is the strongest language, with its traps known. Preparing your interview language then means three things. The first is drilling the standard-library tools rounds use, from a sort with a comparator to a heap, until you write them without looking them up. The second is writing that code in a plain editor with no autocomplete, as Meta’s guide suggests for practice. The third is knowing the version the platform runs, since a new feature may be missing there.

Checkpoint

Check: Fluency, safety and the allowed list

  1. Question 1 of 2 Which of the three tests comes first when you choose your interview language?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Fluency, the language you have solved the most problems in recently

    Fluency first, then safety, then the allowed list. Meta's guide advises practising in the language you are most confident in.

  2. Question 2 of 2 Your round is in three weeks and a friend says a scripting language would be easier than the Java you use daily. What does the lesson advise?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Stay with Java, which you are fluent in, and drill its traps

    The fluency test outweighs a language's general ease. With weeks to go, prepare the language you already know.

The tools a round uses, in 13 languages Pro: opens with a Pro, Premium or Ultimate pass

In this part:

  • Five traps that differ between languages
  • A 20-item fluency drill
  • Writing without autocomplete
  • Check the version the platform runs
  • Practise: your language, round-ready
  • Interview questions
    • Which language will you use for the coding rounds, and why that one?
    • You are strongest in Python, and an assessment you take in three weeks requires JavaScript. How do you prepare in those three weeks?
    • A problem needs the k largest values of a long stream, and your interview language has no heap in its standard library. What do you do in the round?
    • You practised on the newest version of your language, and the assessment platform turns out to run an older one. How do you check what is safe to use, and what do you change?
  • Key takeaways

1 runnable example · 3 interview answers · about 25 minutes

Opening this part with your pass…

This part opens with any MySmartCoPilot pass.

  • Pro pass · 1 week₹79$2.99
  • 30 days₹179$5.99
  • 1 year₹1,699$45

One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

Terms in this lesson

comparator
A function that decides the order of two items, usually returning a negative number, zero or a positive number. Sorts and heaps use one, with a tie-breaker for items that are otherwise equal.
heap
A tree kept in an array that always gives its smallest item, or its largest in a max-heap, at once, and adds or removes an item in O(log n) steps. Priority queues are usually built on one.
standard library
The library that comes with a language and its compiler or interpreter, usable without installing anything else.

References

Related tools

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.