Show Menu
Cheatography

Coding Interview Cheat Sheet (DRAFT) by

Coding Interview

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Understand

Understand the problem

1. key/clue info

Note key/clue info for optimi­zation
e.g. sorted, distinct

2. Examples

Add more examples
1. small case for test
to test after coding
2. edge cases for coding
.1 int: -#, 0, duplicate, max, min, overflow
.2 String: empty, null, upper/­lower, non-al­pha­num­eric, valid range, duplicate
3. big & general case for algorithm
to find an algorithm

3. algorithm

Get a *Strai­ght­forward algorithm
like Brute Force from the big & general example
1. to confirm unders­tanding
2. to get expected run-time
3. to be a base for optimi­zation