How to solve a problem in a Technical Interview 😕
Tags: interview, programming, beginners
Published: 2022-03-10 04:33:22

_First of all Happy New Year Folks, 2022 🍻. Hope you all are safe and well, at your places_.

---

Today, We gonna discuss how to ace a technical interview, whether level of question are pretty much higher than experience or knowledge level, Because its the very much hazy process to get a job in Technical Industry.

Let's assume that you are in a process of an interview for a XYZ company, and you facing the one of the developer of that organization who gone take your interview. 

Firstly, the interviewer gonna introduce his/herself to you and then willing to know about you and your knowledge/work/role. Generally after this part they gonna start the process of asking some question on whiteboard or something, its quite intimidating for everyone whether its entry level or for experienced one.

So, just calm and make your self comfortable.
Then after listening to the problem, you can apply strategy of REACTO, nothing related to react framework.

**

1. Repeat: make sure you do understand the problem.
2. Example: get insights by doing examples 
3. Approach: come up with your approach(es) to the problem (brute force first)
4. Code: write the code for your chosen approach
5. Testing: pass the testcases
6. Optimize: optimize the complexities (time and space) of your algorithm
**

So, after the listing the question just don't react to solve it. Repeat and understand the problem multiple times and try to flow a balance communication with the interviewer. Never make your interview go into awkward silence, because it very hard break it and both persons will get into an comfortable zone. keep asking about question, try to explain your understanding, and look to their reaction so will get some hints, are going in a good direction or not.

then after understanding try put different examples and calculate the expected result roughly. Make table like structure and maintain a log of your inputs and then generate a output based on it and observe a value. Why this is necessary understand this like a black box, you give something and get-out some result. So, history of example its little bit easier to understand the problem.

Describe your solutions like what approach would you opt to solve this problem. Like a question can be solved in various way you can use recursive approach to solve it, iterative way to it or historic solutions. Basically your playing with interviewer and as you are playing with the solution.

So after these steps go for some pseudo-code, not actual coding starts here. just try to divide the things into modular functions roughly, always create a way to go back and update the problem. Try brute force technics to solve the problem, first just try solve then go to adjusting your code. Your approach should always be from high level to low level. Don't focus to much on underlying details like variables names, looping cutting etc., divide your areas where your pretty sure and know its 100% correct. just to give signal about your confidence level.

Now, its time for testing the code you have written, so basically try to pass your examples set which you have created earlier in the process and check whether its creating the correct results.
If not, give it a good debugging time and understand the problem. Implement it again with catch.

So, the last one is the Optimization, suppose you have all your code correctly, now its for performance which include time complexity and space complexity. Its discussion thing where you also take the inputs of the interviewer, telling your different approaches to optimize it.