Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
Question 2: What do you know about scopes?
You may also need to determine the output of a code, considering scope types, closures, and hoisting:
Since variables declared with let are block-scoped, x is only available inside the loop, and the console.log outside the loop will throw an error.
2. Aliasing – Pointers & ReferencesIt is not a revelation that an amazingly high number of professional developers have a lot of confusion about pointers and references. And I don’t mean
In the interview process, we usually ask candidates to answer a simple programming problem-solving question that involves pointers/references, like manipulations on single-link lists. As much as we rarely deal with direct lists manipulation nowadays, we believe it shows whether a candidate can deal with real-life scenarios where multiple levels of indirection occur e.g. in data models. (And as David Wheeler used to say, “All problems in computer science can be solved by another level of indirection, except of course for the problem of too many indirections.”)
1. Scalability & Optimization
If you are planning to do something big, it will need to scale well in this way or another. A basic understanding of scalability is assessed by an automated Codility assessment.
During the technical interview process, we ask candidates to answer a simple programming problem-solving question which has multiple solutions with different simplicity/scalability trade-offs (e.g. compute prefix sums of a sequence of numbers). We assess whether a candidate notices the scalability aspect and whether he/she can deliver the working solution with better scalability.
Time permitting we probe deeper, asking “can it possibly be done better?” This question opens discussions about possible optimizations, sometimes going down to the hardware level, but also about intrinsic limitations of computing machinery, which greatly illustrates whether candidate a can apply theory to a concrete problem.
Question 4: What are arrow functions?
In a nutshell, arrow functions are a short-form way for writing functions (but there’s a lot more you need to know about them!):
You might also like: Programming Problem-Solving Interview Questions You Should Ask