This is a straight-to-the-point, distilled list of technical interview Do's and Don'ts for interviewers, mainly for algorithmic interviews. Some of these may apply to only phone screens or whiteboard interviews, but most will apply to both. I revise this list before each of my interviews as an interviewer to remind myself of them and eventually internalized all of them to the point I do not. @Steve: thanks, not sure what you mean by Python's 'boatload of invocation options and environmental variables' — generally things work fine by typing 'python myprog.py' But in any case, the point of a cheat-sheet is to aid one's memory; most cheat-sheets presume the reader is already very comfortable with core concepts like control flow.
- Software Engineering Interview Cheat Sheet
- Data Structure Cheat Sheet
- Coding Interview Cheat Sheet Printable
Java Programming Cheatsheet. We summarize the most commonly used Java language features and APIs in the textbook. Editing, compiling, and executing. Phases of a coding interview. Congratulations, you are ready to put your skills to practice! In a coding interview, you will be given a technical question by the interviewer. You will write the code in a real-time, collaborative editor (phone screen) or on a whiteboard (on-site), and have 30 to 45 minutes to solve the problem.
We summarize the most commonly used Java language features and APIs in the textbook.
Hello, World.
Editing, compiling, and executing.
Built-in data types.
Declaration and assignment statements.
Integers.
Software Engineering Interview Cheat Sheet
Floating-point numbers.
Booleans.
Comparison operators.
Printing.
Parsing command-line arguments.
Math library.
The full java.lang.Math API.Java library calls.
Type conversion.
Anatomy of an if statement.
If and if-else statements.
Nested if-else statement.
Data Structure Cheat Sheet
Anatomy of a while loop.
Anatomy of a for loop.
Loops.
Break statement.
Do-while loop.
Switch statement.
Arrays.
Inline array initialization.
Typical array-processing code.Two-dimensional arrays.
Inline initialization.Our standard output library.
The full StdOut API.Our standard input library.
The full StdIn API.Our standard drawing library.
The full StdDraw API.Our standard audio library.
The full StdAudio API.Command line.
Redirection and piping.
Functions.
Libraries of functions.
Our standard random library.
Our standard statistics library.
Using an object.
Instance variables.
Constructors.
Instance methods.
Classes.
Object-oriented libraries.
Java's String data type.
The full java.lang.String API.Coding Interview Cheat Sheet Printable
Java's Color data type.
The full java.awt.Color API.Our input library.
The full In API.Our output library.
The full Out API.Our picture library.
The full Picture API.Our stack data type.
The full Stack API.Our queue data type.
The full Queue API.Iterable.
Our symbol table data type.
The full ST API.Our set data type.
The full SET API.Our graph data type.
The full Graph API.Compile-time and run-time errors.
Here's a list of errors compiled byMordechai Ben-Ari.It includes a list of common error message and typical mistakes thatgive rise to them.Last modified on October 30, 2019.
Copyright © 2000–2019Robert SedgewickandKevin Wayne.All rights reserved.
Common Data Structure Operations
Data Structure | Time Complexity | Space Complexity | |||||||
---|---|---|---|---|---|---|---|---|---|
Average | Worst | Worst | |||||||
Access | Search | Insertion | Deletion | Access | Search | Insertion | Deletion | ||
Array | Θ(1) | Θ(n) | Θ(n) | Θ(n) | O(1) | O(n) | O(n) | O(n) | O(n) |
Stack | Θ(n) | Θ(n) | Θ(1) | Θ(1) | O(n) | O(n) | O(1) | O(1) | O(n) |
Queue | Θ(n) | Θ(n) | Θ(1) | Θ(1) | O(n) | O(n) | O(1) | O(1) | O(n) |
Singly-Linked List | Θ(n) | Θ(n) | Θ(1) | Θ(1) | O(n) | O(n) | O(1) | O(1) | O(n) |
Doubly-Linked List | Θ(n) | Θ(n) | Θ(1) | Θ(1) | O(n) | O(n) | O(1) | O(1) | O(n) |
Skip List | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(n) | O(n) | O(n) | O(n) | O(n log(n)) |
Hash Table | N/A | Θ(1) | Θ(1) | Θ(1) | N/A | O(n) | O(n) | O(n) | O(n) |
Binary Search Tree | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(n) | O(n) | O(n) | O(n) | O(n) |
Cartesian Tree | N/A | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | N/A | O(n) | O(n) | O(n) | O(n) |
B-Tree | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) |
Red-Black Tree | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) |
Splay Tree | N/A | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | N/A | O(log(n)) | O(log(n)) | O(log(n)) | O(n) |
AVL Tree | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(log(n)) | O(n) |
KD Tree | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | Θ(log(n)) | O(n) | O(n) | O(n) | O(n) | O(n) |
Array Sorting Algorithms
Algorithm | Time Complexity | Space Complexity | ||
---|---|---|---|---|
Best | Average | Worst | Worst | |
Quicksort | Ω(n log(n)) | Θ(n log(n)) | O(n^2) | O(log(n)) |
Mergesort | Ω(n log(n)) | Θ(n log(n)) | O(n log(n)) | O(n) |
Timsort | Ω(n) | Θ(n log(n)) | O(n log(n)) | O(n) |
Heapsort | Ω(n log(n)) | Θ(n log(n)) | O(n log(n)) | O(1) |
Bubble Sort | Ω(n) | Θ(n^2) | O(n^2) | O(1) |
Insertion Sort | Ω(n) | Θ(n^2) | O(n^2) | O(1) |
Selection Sort | Ω(n^2) | Θ(n^2) | O(n^2) | O(1) |
Tree Sort | Ω(n log(n)) | Θ(n log(n)) | O(n^2) | O(n) |
Shell Sort | Ω(n log(n)) | Θ(n(log(n))^2) | O(n(log(n))^2) | O(1) |
Bucket Sort | Ω(n+k) | Θ(n+k) | O(n^2) | O(n) |
Radix Sort | Ω(nk) | Θ(nk) | O(nk) | O(n+k) |
Counting Sort | Ω(n+k) | Θ(n+k) | O(n+k) | O(k) |
Cubesort | Ω(n) | Θ(n log(n)) | O(n log(n)) | O(n) |