Here are some tips while preparing for your coding interviews.
1. Do study or read or practice all the possible solutions of a problem
Do not just study the optimal algorithm. Study the Brute force algorith too. This will give you better understanding of the optimal solution. And, what are the problems in brute force solution.
2. Never look to solution without solving question
With so many references and solutions available on internet, you tend to see solution first. This is very bad practice, and will block your mind. You will not be able to come up to a solution if a different problem comes to you.
If you are looking at solution first, you are memorizing the solution which will harm in the long run. Rather try to come up to a solution by yourself. Don’t worry about the complexity. Your mind will do wonders in this way. You are allowing your brain to find solutions.
3. Do not write code on an IDE, rather on notepad or copy-pen
While writing code, dont take help on an IDE. They will help in syntax errors and running the code. In practical interview, In almost 90% cases you are expected to write code on paper or on board. Today, IDEs are so advanced that they complete the word and any library function you want to use. Its the tendency of developer to take help of these IDEs and you dont remember the syntax.
Although, syntax errors are not considered bad. But, its advisable not to use an IDE.
4. Practice behavioral questions if your experience is more than 4-5 years
In big tech companies, these qeustions are often asked. And believe me, these questions are hard. If you didn’t do practice, you will not able to come up to a satisfactory answer.
Some examples are:
- What is your biggest achievement
- Which complex problem you think was the most difficult
- How do you handle peer conflict or manager conflict
- What practices you follow during your work
- How you encourage innovation in your team
- What aspects you see while doing code review
- Have you ever failed when you took some decision
- How do you come up to a solution when given problem
- What are the initiatives you have taken
- Have you opposed your senior’s solutions
5. Do not memorize solutions
Always try to solve question by ourselves. Although sometimes, you need to know the various ways to solve particular problems. But, you should not memorize the solutions.
Expert interviewer will come to know about this, and you will be knocked out fast.
6. You should be able to speak about every single piece of your code
Interviewer likes people who knows about every bits and pieces of code. You should know about runtime and space complexities of your code.
Big tech companies like to listen your thought process of solving the problem. A big silence is a negative point.
7. Give Mock interviews or Test your interview skills
As normally candidates have few companies to target. You should not go straight to those companies to give interview.
Either give mock interviews to your friends, or there are some online services which provides mock interviews.
Another way is to start giving interviews to another companies for which you are not inrerested. But, by giving interviews to those companies will boost your confidence, and you will come to know many mistakes of yours. You will come to know what kind of questions are being asked by people. Reading from book and going in market are totally different aspect.
8. Try to write a perfect Code
You should look at following:
- A bug free code (asked to write a production ready code)
You should take care of all corner test cases as well.
- Use modular code
- Use object oriented approach to different aspects
- Give a tested code to interviewer
Most of the time, candidates write the code and without testing their code, they hand over it to interviewer. There is no hurry. Please test your code with few test inputs. Sometimes, interviewer points out a mistake. And, candidate in hurry just fixes something carelessly. Which might fail other cases. So be very careful.
9. Keep a simple resume and mention things you know
Once I saw a 5 page resume of a candidate. When asked about some things mentioned in resume. I came to know that these are the things that he studied while his school. Resumes are to mention about the practical things you know.
Single page resume speaks out loud when written in a correct manner. Only mention things you know, and can be asked upon.
10. Pick up a language
Don’t bother about mastering about many languages. Just stick to one language in which you can write code in front of interviewer.