coding-interview|May 22, 2019|2 min read

How to nail your Coding Interview

TL;DR

Don't jump to optimal solutions — start brute force, communicate your thinking, ask clarifying questions, and walk through examples before coding.

How to nail your Coding Interview

Here are some tips while giving your coding interviews.

1. Never try to jump to the optimal solution first

WHenever interviewer asked you a question. Normally candidates jump to the most optimal solutions straight away. Never do that, even if you know the answer. Manytimes it happens that people just remembers the optimal solution, and when asked in interview on how they come up to this solution, or what are your thought process? They have no clue.

Remember, always start with the brute force algorithm. You can just discuss with your interviewer that this is the simplest approach, and there can be better solutions to this. Discuss them one by one. When you give issues in the naive solution, your interviewer understood that you have knowledge about the topic.

2. Clear the problem statement first before starting solving

Always try to speak the problem statement and clarify any confusion. Do not assume anything. Speak everything, whatever you are assuming. Many candidates just start writing solution, and when asked about specifics. They messed it completely. Not everything is implicit. Try to expand the problem and clear every single details before solving the problem.

3. Bug free code

Interviewer often asked about writing a production ready code. You should be able to come up with an error free code with almost all edge cases handled.

4. Speak your mind

Interviewer loves to hear your thought process. They don’t like a perfect solution with no explanation given. Often candidates failed to explain their solution which clearly states that they have memorize the solution.

5. Most Important, Don’t give-up

It is very important to keep thinking, and speak your mind out. Never ever, give up. Keep up the thinking ON. Interviewer is there to give some hints too. Many times, interviewer gave a super hard problem, and want to see how you are thinking about it. Its not always expected to come up a super optimized solution.

Related Posts

What FAANG companies expect in their interview from candidates

What FAANG companies expect in their interview from candidates

Its every software engineer’s dream to work with the big FAANG companies…

Magical usage of Bitwise operators - Get optimized solutions for many arithmatic problems

Magical usage of Bitwise operators - Get optimized solutions for many arithmatic problems

Introduction I will list some of the interesting usage of bitwise operators…

How to prepare for your next Coding Interview

How to prepare for your next Coding Interview

Here are some tips while preparing for your coding interviews. 1. Do study or…

Coding Interview - Useful Terms Cheatsheet

Coding Interview - Useful Terms Cheatsheet

Big-O notation In simpler terms, its kind of a unit to measure how efficient an…

List of Sorting Algorithms

List of Sorting Algorithms

This topic is one of the most common studied. When somebody started preparation…

Coding Interview Cheatsheet

Coding Interview Cheatsheet

Latest Posts

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Most developers use Claude Code like a search engine — ask a question, get an…

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Every office lobby has the same problem: a visitor walks in, nobody’s at the…

Server Security Best Practices — Complete Hardening Guide for Production Systems

Server Security Best Practices — Complete Hardening Guide for Production Systems

Every breach post-mortem tells the same story: an unpatched service, a…

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

If you’re a Senior Engineer (L5) preparing for Staff (L6+) roles at MAANG…

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF have been in the OWASP Top 10 for over a decade. They’re among the…

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

The OWASP Top 10 is the industry standard for web application security risks. If…