How to approach coding interviews?
Inputs from Google interview video
- Ask for clarifications in the question they've just asked you.
- Ask the question again
- Write down the problem down on paper / whiteboard
- E.g. What will be the range of numbers in an array - Positive / Negative numbers? Is the array sorted / unsorted? Are array elements unique / duplicate?
- Think out loud
- Think out loud before starting writing the algorithm
- Speak out what you are thinking. Constantly. It gives interviewer an opportunity to see your thought process and use that to possibly course correct you or ask you more questions, that might help you demonstrate your knowledge even further.
- Think and talk before you write
- Think through everything what you want to do even before starting the algorithm
- After writing down the solution, test it
- Test it with the data set interviewer gave you.
- If not, then create your own data set and test it.
- Think about edge cases
What to expect in coding / technical interview?
Prepare for Google Engineering Interview
- Data Structures
- Arrays
- Lists / Linked Lists
- Stacks
- Queues
- Binaary Trees
- Hash Tables
- Algorithms
- Space - Time Complexity
- Recursion
- System Design
- Interfaces
- Distributed Systems
- Designing a system under constraints
- Object Oriented Programming
- Operating System
- Processes & Threads
- Concurrency Issues - Semaphores, Mutexes, Lock
- Resources Allocation
- Context Switching
- Scheduling
- How Internet works
- Router
- DNS
- Load Balancers
- Firewalls
- How search works
Types of questions and how to approach them?
In general, you have to demonstrate your problem solving skills. Best bet is to follow the steps mentioned above.
- Coding Question - Efficient code in short time. Be proficient in at least 1 programming language.
- Design Question - Work with your interviewer to create a high level system and dive in into deeper issues
- General Analysis Question - Make sure you understand all aspects of a problem and if possible, offer multiple solution with its merits