Please enable JavaScript.
Coggle requires JavaScript to display documents.
Cracking the coding interview: 150 questions and solutions - Coggle Diagram
Cracking the coding interview: 150 questions and solutions
Interview process
Timeline and Preparation Map
1+ year
build side project
expand network
build website/portfolio
showcasing
focus work on "meaty" project
3-12 month
try to add on
one more project
create draft of resume and
send it out for resume review
make target list of
preferred companies
read intro sections of Cracking the coding interview
begin practicing
interview questions
form mock interview group with
friends to interview each other
1-3 month
Do mini-projects to solidify
understanding of key concepts
Do several mock interviews
Create list to track mistakes
you've made solving problems.
4 weeks
create interview prep grid
review/update resume.
re-read intro to CtCi, especial tech & behavioral section,
practice questions, writing code on paper
1 week
onsite interview
phone interview
Do a final mock interview
rehearse stories from the interview prep grid
re-read 5 algorithm approaches
continue to practice interview questions
1 more item...
day before
Rehearse each story from interview prep grid once.
continue to practice questions &
review your list of mistakes
re-read 5 algorithm approaches.
Make sure remember them
review powers of 2 list. Print list if a phone screen
Day of
be on time and confident
After
Write thanks you note to recruiter
check in after 1 week
if not information from recruiter
if no offer, ask when you can re-apply. don't give up hope
Top 10 Mistakes
Frequently Asked Questions
Dress Code
Incorrect Answers
The Evaluation Process
How Questions are Selected
Behind the Scenes
Special Situations
Experienced Candidates
Tester and SDETs
Special Situations
Program and Product Manager
Start-Ups
Before the Interview
Getting the right experience
Building a Network
Writing a great resume
Employment History
Length
Projects
Programming Languages and Software
Advice for Non-Native English Speakers and Internationals
5.Behavioral Questions
Behavioral Preparation
How to Prepare
"Tell me about a time when you...,"
Most Challenging
What You Learned
Most Interesting
Hardest Bug
Enjoyed Mos
Conflicts with Teammates
What are your weaknesses?
What was the most challenging part of that project?
What questions should you ask the interviewer?
Genuine Questions
Insightful Question
Passion Question
Handling Behavioral Question
let note arrogant by being specific!
Limit Details, just state the key points
Give Structured Answer
S.A.R. (Situation, Action, Result)
6.Technical question
Technical Preparation
How to practice a question
try to solve problem by your own
write on the paper
test you code on paper
type your paper cade as is into a computer
What You Need To Know
must-have to knowledge table
powers of 2 table
handling technical questions
step 1: ask to detail question
2: design an algorithm
3: Write pseudocode first, but tell interviewer
4: write code
5: test your code
Five Algorithm Approaches
\What Good Coding Looks Like
Error Checking
Flexible and Robust
Modular
Appropriate Code Reuse
Use Data Structures Generously
aspects of "good" code
Correct
Efficient
Simple
readable
maintainable
The Offer and Beyond
handling offers and rejection
Offer Deadlines and Extensions
Declining an Offer
Handling Rejection
evaluating the offer
The Financial Package
Career Development
Company Stability
The Happiness Factor
negotiation
just do it
have a viable alternative
have a specific "ask"
Overshoot
Think Beyond Salary
Use Your Best Medium
on the job
set a timeline
build strong relationships
build strong relationships
ask for what you want
Interview Questions
Data Structures
Arrays and strings
hash tables
string buffer
array list (Dynamically resizing array)
Linked lists
Creating a Linked List
Deleting a node
the runner technique
recursive problems
stacks and queues
implementing a stack
implementing a queue
trees and graphs
Potential Issues to Watch Out For
Binary Tree vs. Binary Search Tree
Balanced vs. Unbalanced
Full and Complete
Binary Tree Traversal
Tree Balancing: Red-Black Trees and AVL Trees
Tries
Graph Traversal
Breadth First Search
Depth First Search (DFS)
Concepts and algorithms
Bit Manipulation
Bit Manipulation By Hand
Bit Facts and Tricks
Common Bit Tasks: Get, Set, Clear, and Update Bit
Brain Teasers
Mathematics and probability
Prime Numbers
Divisibility
Checking for Primality
Probability
A and B
A or B
Independence
Mutual Exclusivity
Object-Oriented Design
How to Approach OOD Questions
step1: handle ambiguity ( six Ws: who, what, where, when, how, why)
step 2: Define the core objects
step 3: analyze, relationships
step4: Investigate actions
Design patterns
singleton
factory
Recursion and Dynamic Programming
How to Approach Recursion
Bottom-Up Recursion
start solve to simplest case
Top-down
think about dividing problem for case in into sub problems with overlap between case
Dynamic Programming problem
Recursive vs. Iterative Solutions
scalability and Memory Limits
The Step-By-Step Approach
Step 1: Make Believe
Step 2: Get Real
Step 3: Solve Problems
: Information, Strategies and Issues
A Typical System
Dividing Up Lots of Data
By Order of Appearance
Hash Value
Actual Value
Arbitrarily
Sorting and searching
Common Sorting
Bubble Sort \ 0(n2) average and worst case. Memory: 0(1).
Selection Sort \ 0(n2) average and worst case. Memory: 0(1).
Merge Sort \ 0(n Log(n)) average and worst case. Memory: Depends.
Quick Sort | Runtime: 0(n Log (n)) average, 0(n2) worst case. Memory: 0( Log (n) )
Radix Sort Runtime: 0(kn)
Searching
binary search
Testing
interviewers want to test the following
Big Picture Understanding
Knowing How the Pieces Fit Together Organizatio
Organization
Practicality
Testing a Real World Object
Step 1: Who will use it? And why
Step 2: What are the use cases?
Step 3: What are the bounds of use?
Step 4: What are the stress/failure conditions?
Step 5: How would you perform the testing?
Testing a Piece of Software
Testing a Function
Troubleshooting Question
Knowledge Based
C and C++
java
Databases
SQL Syntax and Variations
Denormalized vs. Normalized Databases
SQL Statements
Small Database Design
Large Database Design
Threads and Locks
Additional review Problems
moderate
hard
Solutions
Data Structures
Concepts and algorithms
Knowledge Based
Additional review Problems