How to prep for a tech interview

Marcus Longoria
5 min readNov 8, 2021

Recently I’ve been applying to multiple software engineering jobs at small start up companies. During the technical screenings I’ve been asked to solve a variety of coding problems and explain what my code is doing. This has been an exciting new experience and I’ve learned a lot. While on this journey I’ve looked up many tutorials, sought advice from multiple people in the tech field and have been doing daily coding challenges on Code Wars. And the one thing that all these things have in common is this concept called REACTO. Now based on the name you’d think that it had something to do with the REACT library used in JavaScript but no, REACTO actually stands for; Repeat, Examples, Approach, Code, Test and Optimize. In this short blog I’m going to attempt to explain each of these steps and provide you with examples on how to apply it to your learning.

REPEAT the question:

The first thing you want to do when in a technical interview or when you’re doing any kind of coding challenge is, you want to make sure you understand what the question is and what your code is supposed to do. When I first started looking at coding challenges and attempting to solve them, the thing I struggled most with was not understanding exactly what I’m supposed to be doing. In my eagerness, I would end up trying to code everything as quickly as possible and I kept messing up simple things I could’ve avoided if I had just spent a little more time on trying to understand exactly what the question was asking. And in an interview you have the interviewer there who can help clarify any questions you may have.

Write out EXAMPLES:

Once you feel like you understand what the problem is and what you’re being asked to do, you want to write out a couple of examples to work with your function. For example, maybe you’re being asked to sort out an array in a specific order, or modify a string, or just find out whether something is true or false. Well in order to check if your function continuously returns the value you’re expecting, you’re going to need some data that is randomized and takes into account any possible combinations that you may encounter when testing your function. For the most part, you’re usually given some examples by the interviewer or the website you’re using to practice, but if that’s not the case for some reason, this is a very important step in order to check the practicability of your function.

Describe your APPROACH:

This next part in my opinion, is the most important and the part that requires the most practice. You need to explain your approach to the problem you’ve been given. This is where you’re “coder brain” gets put to work and you need to start thinking like a programmer. This is where writing your code on a whiteboard by hand comes into play. This isn’t the “coding” part yet but more like a written out blueprint of what you’re going to attempt to make. You want to break up your function into different parts that handle different areas of the process, sort of like an assembly line. For example, let’s say you’ve been asked to take a single string like “Hello, World!” and need to remove the first character in the string “H”. Well the first thing you might want to do is turn the string into an array separated by each character in the string so that it’s now [“H”, “e”, “l”, “l”, “o”, “,”, “W”, “o”, “r”, “l”, “d”, “!”]. Now that each character has been isolated you can create a step that removes the first letter so that your new array looks like this, [“e”, “l”, “l”, “o”, “,”, “W”, “o”, “r”, “l”, “d”, “!”]. And finally, you want to change your new array back in to a string so it’s now “ello, World!”. Obviously there’s way better and more efficient ways to do this, but that part isn’t important yet, instead, just focus on coming up with a solution to your problem and later on you can revise it and clean it up.

Write your CODE:

Now it’s finally time to start writing out some code. There’s not much to say about this step other than, you just need to practice and learn the syntax of whatever language you’re most proficient in. At first, you probably want to try making the function work the same way you explained it in your approach by going step by step in a way that makes sense to you. So in this step, don’t worry too much on making your code nice and neat but just do what you can to make it work the way it’s supposed to.

TEST your code:

Testing your code goes hand-in-hand with writing it out. You’re probably going to go back and forth between these two steps quite a while before moving on to the next but don’t get discouraged, no one ever gets their code right the first time, sometimes even the easiest function/algorithms can trip the most experienced programmers up. For the most part, during a coding interview, you’re asked to code on a website like hacker rank or leet code which already have built in test for your code but if not, you might want to write a few simple tests in your own IDE but make sure you ask your interviewers if you’re allowed to do so, before you go and start testing your code out.

OPTIMIZE your code:

Usually, depending on the time you have left to complete your challenge, your interviewers might be satisfied with just the steps you’ve taken up to now. But if you have the chance I highly recommend going back to your code and cleaning it up and making it more efficient. This is not only best practice for the future, but also it shows your interviewer that you understand how to write clean and efficient code.

Hopefully after reading this blog you feel a bit more prepared for your next technical interview or just in general when working on coding problems. Just remember that most technical interviews are meant to examine your thought process and not so much to see if you can actually solve the problem, however, getting the best and most efficient solution to the problem couldn’t hurt your chances. Regardless, you just want to get comfortable with explaining your code and the steps you took to solve the problem.

--

--