From 177f7909f252d7d8d90665ce865aa61020c508a7 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sat, 14 Oct 2017 14:31:19 +0800 Subject: [PATCH] Add in interview cheatsheet --- README.md | 2 + preparing/cheatsheet.md | 95 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 preparing/cheatsheet.md diff --git a/README.md b/README.md index 002d416d..1cc0b701 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Carefully curated content to help you ace your next technical interview, with a focus on algorithms and the front end domain. System design questions are in-progress. Besides the usual algorithm questions, other **awesome** stuff includes: - [How to prepare](preparing) for coding interviews +- [Interview Cheatsheet](preparing/cheatsheet.md) - Straight-to-the-point Do's and Don'ts - [Algorithm tips and the best practice questions](algorithms) categorized by topic - ["Front-end Job Interview Questions" answers](front-end/interview-questions.md) - [Interview formats](non-technical/interview-formats.md) of the top tech companies @@ -42,6 +43,7 @@ Also, existing resources focus mainly on algorithm questions, and lack in covera ## Contents - **[Preparing for a Coding Interview](preparing)** + - [Interview cheatsheet](preparing/cheatsheet.md) - Straight-to-the-point Do's and Don'ts - **[Algorithm Questions](algorithms)** - Questions categorized by topics - **[Design Questions](design)** - **[Front-end Study Notes](front-end)** - Summarized notes on the various aspects of front-end diff --git a/preparing/cheatsheet.md b/preparing/cheatsheet.md new file mode 100644 index 00000000..9e4e163e --- /dev/null +++ b/preparing/cheatsheet.md @@ -0,0 +1,95 @@ +Interview Cheatsheet +== + +This is a straight-to-the-point distilled list of technical interview Do's and Don'ts. Some of these may apply to only phone screens on whiteboard interviews but most will apply to both. + +### 1. Before Interview + +**Do's** + +- Prepare pen, paper and earphones/headphones. +- Find a quiet environment with good internet connection. +- Stay calm and composed. +- Familiarize yourself with the coding environment - CoderPad, CodePen, etc. +- Dress comfortably. Usually you do not need to wear shirt and tie. + +### 2. Introduction + +**Do's** + +- Introduce yourself in a few sentences under a minute. +- Mention interesting points that are relevant to the role you are applying for. +- Sound enthusiastic! Speak with a smile and you will naturally sound more engaging. + +**Don'ts** + +- Spend too long introducing yourself. The more time you spend talk the less time you have to code. + +### 3. Upon Getting the Question + +**Do's** + +- Repeat the question back at the interviewer. +- Clarify input format and range. +- Work through a small example to ensure you understood the question. +- Explain a high level approach even if it is a brute force one. +- Improve upon the approach and optimize. +- State and explain the time and space complexity of your approaches. +- If stuck, think about related problems you've seen before and how they were solved. Check out the [tips](../algorithms) in this section. + +**Don'ts** + +- Ignore information given to you. Every piece is important. +- Jump into coding straightaway. +- Start coding without interviewer's green light. + +### 4. During Coding + +**Do's** + +- Practice good coding style. Clear variable names, consistent operator spacing. +- Defensive coding. Check for nulls, empty collections, etc. +- Explain what you are coding/typing to the interviewer, what you are trying to achieve. +- Type/write at a reasonable speed. +- Write in a modular fashion. Extract out chunks of repeated code into functions. +- Use the hints given by the interviewer. +- Practice whiteboard space-management skills. +- Demonstrate mastery of the language. +- Let the interviewer talk. Usually if they speak, they are trying to give you hints or steer you in the right direction. + +**Don'ts** + +- Remain quiet the whole time. +- Spend too much time writing comments. +- Use extremely verbose variable names. +- Copy and paste code without checking. +- Write too big (takes up too much space) or too small (illegible) if on a whiteboard. + +### 5. After Coding + +**Do's** + +- Scan through your code for mistakes as if it was your first time seeing code written by someone else. +- Check for off-by-one errors. +- Come up with more test cases. Try extreme test cases. +- Step through your code with those test cases. +- Look out for places where you can refactor. +- Reiterate the time and space complexity of your code. +- Explain trade-offs and how the code/approach can be improved if given more time. + +**Don'ts** + +- Immediately announce that you are done coding. +- Argue with the interviewer. + +### 6. Wrap Up + +**Do's** + +- Ask questions and ask good questions! Pick some questions from [here](../non-technical/questions-to-ask). +- Ask questions that are tailored to the company. +- Thank the interviewer. + +**Don'ts** + +- End the interview without asking any questions.