This document summarizes Gayle Laakmann McDowell's presentation on cracking the coding interview. She discusses her background interviewing candidates at Google, Microsoft, and Apple. The presentation covers technical skills, behavioral questions, applying to jobs, and preparing for interviews. It provides advice on resumes, communication, studying algorithms and data structures, and tips for acing different types of interview questions. The overall message is that interviews are meant to be challenging, and candidates should focus on improving relative to others, not on getting everything perfectly right.
ICT Role in 21st Century Education & its Challenges.pptx
Gayle McDowell: Cracking the coding interview
1. Cracking the Coding Interview
Advice and Strategies for
Software Engineering Interviews
Gayle Laakmann McDowell
Founder / CEO, CareerCup.com
Author of The Google Resume and Cracking the Coding Interview
McDowell | NIT Trichy | Feb 2012
CareerCup.com
2. Technical Skills
My Background
• Software Engineer @ GOOG, MS & Apple
– 3 Years on Google Hiring Committee
Behavioral
– Interviewed 150+ candidates
• Founder of CareerCup.com
• Author
Applying
– Cracking the Coding Interview
– The Google Resume
Process
McDowell | CareerCup.com
6. Technical Skills Big Company Evaluation (Coding)
Experience
Personality
Behavioral
Intelligence
Coding
Skills
Applying
Testing
aptitude, not
knowledge
Process
McDowell | CareerCup.com
7. Technical Skills
How You Are Judged
How did you do RELATIVE
to other candidates on
the SAME question?
Behavioral
It’s not about how
quickly you solved
Applying
the problem…
… it’s about how quickly
you solved it relative to
Process
other candidates.
McDowell | CareerCup.com
9. Technical Skills
Indians are at a disadvantage
• Far away
– Fewer recruiting opportunities
• Unfamiliar
Behavioral
– Recruiters may not understand your
school, GPA, etc
• Language barrier / Cultural differences
Applying
– Accents, grammar, accidental sexism
• Different / less experience
– More emphasis in US on projects
Process
10. Technical Skills
So what to do?
• Get equivalent experience
• Translate GPA & other items
Behavioral
• Use good grammar & punctuation
– On resumes, cover letters, etc
– No abbreviations, no sloppiness
Applying
• Be careful about your assumptions
– Sexism is not acceptable in the U.S. Ever.
Process
11. Technical Skills
Cheat Sheet for Indians
(Grammar / Writing)
• Space after comma & period. Never before.
– WRONG: “Hello .I am Gayle .”
– RIGHT: “Hello. I am Gayle.”
• Questions need a question mark
Behavioral
– WRONG: “Do you have one.”
– RIGHT: “Do you have one?”
• No abbreviations
– WRONG: “Ny1 dr?”
Applying
– RIGHT: “Is anyone there?”
• Commands are rude (use a question)
– WRONG: “Send it to me.”
– RIGHT: “Would you mind sending it to me?”
Process
12. Technical Skills
Cheat Sheet for Indians
(Gender / Sexism)
• Mr. LastName / Ms. LastName
– WRONG: Ms. Gayle
– RIGHT: Ms. McDowell
Behavioral
– But “Dear Gayle” is perfectly okay in U.S.
• “Guy” / “Guys” is not unisex* in the U.S.
– WRONG: “I need to hire a really smart CS guy.”
– *Except: “you guys” and “hey guys”
• Don’t assume that people are male / female
Applying
– (Just don’t use Mr. / Ms. in emails!)
• It is EXTREMELY offensive to comment on
someone’s looks
– But a great way to get fired / rejected
Process
13. Technical Skills
Cheat Sheet for Indians
(Getting Experience)
• Build something!
Don’t waste your summers!
Behavioral
• Make a kick-ass resume
It’s really not that hard.
Applying
Process
McDowell | CareerCup.com
14. Technical Skills How We Review Resumes (U.S.)
1. Pull resume out of giant stack
2. Spot-check: company names, “Glanced
at,” not read.
positions, projects, schools.
Behavioral
15 – 30
3. Skim bullets to see if you’ve seconds
written real code.
Applying
Reject Interview
4. Go to next resume & whine about
how many more you have left.
Process
McDowell | CareerCup.com
15. How CS Resume
Should Look (U.S.) Observe: No Objective!
Objectives / summaries
One Page Only! are almost always useless.
Unless > 10 years exp.
A Real Resume Format
with organized columns
Short (1 – 2 line bullets)
Focus on Accomplishments
not responsibilities
GPA - Translated
We don’t understand
“first class”
3 – 4 Projects
Courses & independent
Finished or unfinished
List of Technical Skills
Short! Cut the “fluff.”
17. Technical Skills
Communication Tips
• Goals:
– Answer the question.
Behavioral
– Deliver a *good* answer.
– Communicate well.
• Strategies:
Applying
– Nugget First
– S.A.R.: Situation, Action, Result
Process
McDowell | CareerCup.com
18. Technical Skills
Preparing for Behavioral Qs
• Create Preparation Grid for Projects
OS Project Amazon Intern.
Behavioral
Enjoyed
Hated
Most Challenging
Applying
Hardest Bug
+ Behavioral Grid [for PM & less tech. roles]
Process
McDowell | CareerCup.com
19. Technical Skills
Structure 1: Nugget First
• Lead with your “thesis” / nugget
– Grabs the listener’s attention
Behavioral
– Gives them context for where you’re going.
Q: What accomplishment are you
most proud of?
Applying
A: I’m most proud of the way I
re-architected the …
Process
McDowell | CareerCup.com
20. Technical Skills
Structure 2: S.A.R.
S ituation What was the issue?
Behavioral
A ction What did you do about it?
R esult What was the impact?
Applying
Process
McDowell | CareerCup.com
22. Technical Skills
How to study
• Study the basics
– Complex algorithms generally unnecessary.
Behavioral
• Practice solving questions
– Don’t memorize!
– See: CtCI & CareerCup.com
Applying
• Push yourself!
• Write code on paper
Process
McDowell | CareerCup.com
23. Technical Skills
Data Structures
• How to implement
• When to use (pros / cons)
Behavioral
Linked Lists Stacks Queues
Trees Tries Graphs
Applying
Vectors Heaps Hashtables
Process
McDowell | CareerCup.com
24. Technical Skills
Algorithms
• Implementation
• Space vs. Time Quick Sort Merge Sort
Complexity
Behavioral
Tree Insert / Find Binary Search
Applying
Breadth-First Depth-First
Search Search
Process
McDowell | CareerCup.com
25. Technical Skills
Concepts
• Not just a concept – know how to code!
Behavioral
System Design & Memory
Threading
Scalability Management
Applying
Probability +
Recursion Bit Manipulation
Combinatorics
Process
McDowell | CareerCup.com
27. Technical Skills
Technical Questions
1. Ask Questions!
– Questions are more ambiguous than they appear
2. Talk out loud
Behavioral
– Show us how you think
3. Think critically
– Does your algorithm really work? What’s the
space and time complexity?
4. Code slowly and methodically
Applying
– It’s not a race
5. Test your code
– And make CAREFUL fixes.
Process
McDowell | CareerCup.com
28. Technical Skills
What does a “good coder” do?
• Be methodical. Don’t try to rush.
• Reasonably Bug Free
Behavioral
– Thorough testing (and careful fixing)
– Check for error conditions
• Clean coding
– Use other functions
Applying
– Good use of data structures (define own if useful)
– Concise and readable
Process
McDowell | CareerCup.com
29. Technical Skills Types of Interview Questions
Coding & Algorithms Object Oriented Design System Design
“Reverse a Linked “Design a Parking “Design a
Behavioral
List” Lot” Web Crawler”
Applying
Process
McDowell | CareerCup.com
30. Technical Skills Types of Interview Questions
Coding & Algorithms Object Oriented Design System Design
Pattern Matching
Behavioral
Simplify & Generalize
Base Case & Build
Applying
Data Structure
Brainstorm
Process
McDowell | CareerCup.com
31. Technical Skills Algorithm Qs: Pattern Matching
Coding & Algorithms Object Oriented Design System Design
Pattern Matching
Q: Write code to reverse the order of words
Behavioral
in a sentence.
Simplify & Generalize “dogs are cute”
“cute are dogs”
Base Case & Build Similar to: reverse characters in a string.
Applying
“dogs are cute”
Data Structure “etuc era sgod”
Brainstorm
A: Reverse full string, then reverse each
word.
Process
McDowell | CareerCup.com
32. Technical Skills Algorithm Qs: Simplify & Generalize
Coding & Algorithms Object Oriented Design System Design
Pattern Matching
Q: Design algorithm to figure out if you can
Behavioral
build a ransom note (array of strings) from a
Simplify & Generalize magazine (array of strings).
Simplify: what if we used characters instead
Base Case & Build of strings?
Applying
Build array of character frequencies.
Data Structure
Brainstorm Generalize: how we can extend answer to
words?
Process
A: Build hashtable from word to frequency.
McDowell | CareerCup.com
33. Technical Skills Algorithm Qs: Base Case & Build
Coding & Algorithms Object Oriented Design System Design
Pattern Matching Q: Design algorithm to print subsets of set.
Behavioral
{a, b, c} {}, {a}, {b}, {c}, {a, b},
Simplify & Generalize {a, c}, {b, c}, {a, b, c}
S({}) {}
Base Case & Build S({a}) {}, {a}
Applying
S({a, b}) {}, {a}, {b}, {a, b}
Data Structure S({a, b, c}) ?
Brainstorm
A: Build S(n) by cloning S(n-1) and adding n
to the cloned sets.
Process
McDowell | CareerCup.com
34. Technical Skills Algorithm Qs: Data Structure Brainstorm
Coding & Algorithms Object Oriented Design System Design
Pattern Matching Q: There are 10^10 possible phone #s.
Behavioral
Explain how you could efficiently implement
Simplify & Generalize assignSpecificNum(num) and
assignAnyAvailableNum().
Base Case & Build Array (sorted)? Too slow to remove num.
Applying
Linked list? Too slow to find specific num.
Data Structure Hash table? Can’t iterate through free nums.
Brainstorm Tree? Ah-ha!
A: Store free #s in BST. Remove when taken.
Process
McDowell | CareerCup.com
35. Technical Skills How To Solve Algorithm Questions
Coding & Algorithms Object Oriented Design System Design
Pattern Matching Compare to similar problems.
Behavioral
Simplify & Generalize Solve first for a simplified / tweaked problem.
Base Case & Build
Solve for n = 1, and build solution for n = 2.
Applying
Data Structure
Brainstorm Try to apply data structure to solve problem.
Process
McDowell | CareerCup.com
36. Technical Skills Object Oriented Design
Coding & Algorithms Object Oriented Design System Design
Handle Ambiguity
Behavioral
What about the question is ambiguous?
Design the Core Objects
What are the main objects in the system?
Applying
Analyze Relationships
How are the objects related to each other?
Investigate Actions
What are the main operations?
Process
McDowell | CareerCup.com
37. Technical Skills Object Oriented Design
Coding & Algorithms Object Oriented Design System Design
Handle Ambiguity
Behavioral
Is it a single restaurant, or part of a chain?
How would you Design the Core Objects
design the data Guest, Party, Table, Server, Host, …
structures and
Applying
objects for a Analyze Relationships
Server and Host are both Employees…
restaurant?
Investigate Actions
A Party is seated at a Table by a Host…
Process
McDowell | CareerCup.com
38. Technical Skills System Design
Coding & Algorithms Object Oriented Design System Design
Handle Ambiguity
Behavioral
What about the question is ambiguous?
Make Believe
Pretend there wasn’t so much data & solve
Applying
Get Real
Go back to the real problem. What breaks?
Solve Problems
Solve the issues you just found.
Process
McDowell | CareerCup.com
39. Technical Skills System Design
Coding & Algorithms Object Oriented Design System Design
Handle Ambiguity
Behavioral
Do the words need to be in a specific
order?
Given millions of
documents, find Make Believe
Assume everything can fit on one machine.
all documents
Applying
which contain a Get Real
list of words. Must split up data across machines.
Solve Problems
Process
Divide hash table by file or by keyword?
McDowell | CareerCup.com
40. Technical Skills Whew! All Done!
Coding & Algorithms Object Oriented Design System Design
Pattern Matching
Behavioral
<Gulp> This is a lot of
Simplify & Generalize stuff. Do I need to get
everything right?
Base Case & Build
Applying
Data Structure
Brainstorm
Process
McDowell | CareerCup.com
41. Technical Skills
Evaluation is RELATIVE,
not absolute.
Behavioral
<Gulp> This is a lot of
stuff. Do I need to get
It’s not about how everything right?
quickly you solved
the problem…
Applying
</Gulp>
… it’s about how quickly
you solved it relative to
other candidates.
Process
McDowell | CareerCup.com
42. Technical Skills
So RELAX!
Behavioral
Interviews are supposed to be hard!
Everyone makes mistakes.
Applying
Everyone!
Process
McDowell | CareerCup.com
44. Technical Skills
After Your Interview
• Follow-up with your recruiter
– No response != rejection
Behavioral
• You have no idea how well/poorly you
did.
– Seriously. I know you think you do. But you
don’t.
Applying
• Lots of randomness.
– So if you fail, get up and try again.
Process
McDowell | CareerCup.com
45. Technical Skills
Other Resources
Sold Today CareerCup.com
• Interview Videos
Signed (just ask!) • iPhone App
• Resume Review
• Mock Interviews
Behavioral
today Or, stalk me online at…
Rs. • twitter.com/gayle
400 • facebook.com/gayle
• technologywoman.com
Applying
• gayle@careercup.com
5 stars!
Process
McDowell | CareerCup.com
Notas do Editor
Hashtables – super important!!!
Bit manipulation – super important!Recursion: how does recursion impact space and time?Practice converting from iterative into recursion