Coding interviews are not the same as your day-to-day coding life because they focus on extracting what you know and if you can improve the team you want to join. In checking this, coding interviews must do it quickly to weed out any bad candidates. So coding interviews will be from 30-60 minutes long.
Considering how long you generally take to code something, 30 minutes may seem like an impossible task.
All coding interviews and questions should allow enough time for a prepared java developer to complete the task. Of course, you may have to take shortcuts or use different methods than you usually would, but you should complete the task.
Something else to consider, if you don’t complete the coding interview question, that will almost certainly be considered a failure, and you won’t get the job.
Understanding What You Need To Study
So what you do need to consider are:
- What level is this role? Junior, Intermediate, or Senior?
- What topics are common?
Coding interviews are well known to test data structures and algorithms as general topics. Ensure you have a thorough understanding of the common topics in each of these areas.
- Research the company.
Is this a well-known company that has listed its coding interview expectations on the web? Have other interviewees listed details that can give you some insight to do well? You may even find practice sites like LeetCode.com list the company, which allows you to pick which coding questions you will practice with.
Plan Your Preparation
Do not go to a coding interview unprepared, as you will likely fail. As mentioned, coding interviews are different from your day-to-day coding life. Therefore, you need to prepare a plan of attack on studying, practicing, and learning about this company’s entire coding interview process.
The general timeframe is four weeks of preparation for a senior developer or somebody that has gone on many coding interviews. If this is your first time, then 12 weeks would be the expected length of preparation time.
Plan your approach:
- Study general topics like data structures and algorithms.
- Practice coding interview questions on LeetCode.com or other sites.
- Review your coding interview questions to see where you didn’t do well.
The most important piece of advice is to practice, review, and practice more.
Your coding interview is not going to be only about coding. Part of the interview is reviewing you as a person and how well you’d fit into the team.
Part of this requires you to look at the company, its values, where the company is going, and if they have any specific requirements for their employees. Often this is all available online and considered company values. So ensure you know what they are and discuss them as if they are your own.
Part of this will also be how well you discuss your code as you’re writing it. An essential theme in coding interviews is that you must discuss and defend your code, explaining to the interviewer why you’ve picked specific methods for solving the problem. Remember that there are many solutions, but you want a clean, efficient, and bug-free solution.
So an essential skill to pick up is writing code and talking at the same time.
Involve a colleague or friend to help test this side of things by going through some coding interview questions with them and explaining what you’re doing. Then, take their feedback to see how you can improve that part of your coding interview skillset.
- Check parentheses
- Array deconstructuring
- Destructure Undefined
- Define functions
- Type coercion
- ES6 classes and the difference between ES5
- Prototypal inheritance
- Functional Programming
- Pure functions
- Shallow copying
- Higher-order functions
- Partial functions
- DOM and web browser topics
- Hide and show
- Event handling
- Asynchronous callbacks
Ensure you practice as many coding interview questions as possible and do it often. Make sure you review your results and study any aspects that you’re not strong enough in. Sites like LeetCode.com offer free or paid options. The paid options are good if your company is large enough to be listed. In addition, you can get specific questions that your interviewing company often uses.
Remember to time yourself. Coding interviews are extremely short, and you need to get your code completed. Uncompleted coding interview questions will be considered a failure.
Also, remember, keep talking through your process while coding. Give the interviewer an insight into your reasoning and the methods you are using while you code.