Gayle McDowell: Cracking the coding interview

7,884 views
7,447 views

Published on

Talk video in youtube:
http://www.youtube.com/watch?v=rEJzOhC5ZtQ

Published in: Education, Career, Business
0 Comments
14 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,884
On SlideShare
0
From Embeds
0
Number of Embeds
17
Actions
Shares
0
Downloads
370
Comments
0
Likes
14
Embeds 0
No embeds

No notes for slide
  • Hashtables – super important!!!
  • Bit manipulation – super important!Recursion: how does recursion impact space and time?Practice converting from iterative into recursion
  • Gayle McDowell: Cracking the coding interview

    1. 1. Cracking the Coding Interview Advice and Strategies for Software Engineering Interviews Gayle Laakmann McDowell Founder / CEO, CareerCup.comAuthor of The Google Resume and Cracking the Coding Interview McDowell | NIT Trichy | Feb 2012 CareerCup.com
    2. 2. Technical Skills My Background • Software Engineer @ GOOG, MS & Apple – 3 Years on Google Hiring CommitteeBehavioral – Interviewed 150+ candidates • Founder of CareerCup.com • AuthorApplying – Cracking the Coding Interview – The Google ResumeProcess McDowell | CareerCup.com
    3. 3. Technical Skills Slides Posted Online posted at: www.technologywoman.comBehavioral Click “Speaking Engagements”ApplyingProcess McDowell | CareerCup.com
    4. 4. Technical Skills Process Applying Evaluation Experience Structure ResumeBehavioral Soft Skills Tech SkillsApplying Preparation Preparation Interview InterviewProcess McDowell | CareerCup.com
    5. 5. Interview Process McDowell | CareerCup.com
    6. 6. Technical Skills Big Company Evaluation (Coding) Experience PersonalityBehavioral Intelligence Coding SkillsApplying Testing aptitude, not knowledgeProcess McDowell | CareerCup.com
    7. 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 solvedApplying the problem… … it’s about how quickly you solved it relative toProcess other candidates. McDowell | CareerCup.com
    8. 8. Resumes & Application Process McDowell | CareerCup.com
    9. 9. Technical Skills Indians are at a disadvantage • Far away – Fewer recruiting opportunities • UnfamiliarBehavioral – Recruiters may not understand your school, GPA, etc • Language barrier / Cultural differencesApplying – Accents, grammar, accidental sexism • Different / less experience – More emphasis in US on projectsProcess
    10. 10. Technical Skills So what to do? • Get equivalent experience • Translate GPA & other itemsBehavioral • Use good grammar & punctuation – On resumes, cover letters, etc – No abbreviations, no sloppinessApplying • Be careful about your assumptions – Sexism is not acceptable in the U.S. Ever.Process
    11. 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 markBehavioral – 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. 12. Technical Skills Cheat Sheet for Indians (Gender / Sexism) • Mr. LastName / Ms. LastName – WRONG: Ms. Gayle – RIGHT: Ms. McDowellBehavioral – 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 / femaleApplying – (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 / rejectedProcess
    13. 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.ApplyingProcess McDowell | CareerCup.com
    14. 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. 15. How CS ResumeShould 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 columnsShort (1 – 2 line bullets) Focus on Accomplishments not responsibilities GPA - Translated We don’t understand “first class” 3 – 4 Projects Courses & independent Finished or unfinishedList of Technical Skills Short! Cut the “fluff.”
    16. 16. Behavioral Questions McDowell | CareerCup.com
    17. 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, ResultProcess McDowell | CareerCup.com
    18. 18. Technical Skills Preparing for Behavioral Qs • Create Preparation Grid for Projects OS Project Amazon Intern.Behavioral Enjoyed Hated Most ChallengingApplying Hardest Bug + Behavioral Grid [for PM & less tech. roles]Process McDowell | CareerCup.com
    19. 19. Technical Skills Structure 1: Nugget First • Lead with your “thesis” / nugget – Grabs the listener’s attentionBehavioral – 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. 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?ApplyingProcess McDowell | CareerCup.com
    21. 21. Technical SkillsInterview Prep McDowell | CareerCup.com
    22. 22. Technical Skills How to study • Study the basics – Complex algorithms generally unnecessary.Behavioral • Practice solving questions – Don’t memorize! – See: CtCI & CareerCup.comApplying • Push yourself! • Write code on paperProcess McDowell | CareerCup.com
    23. 23. Technical Skills Data Structures • How to implement • When to use (pros / cons)Behavioral Linked Lists Stacks Queues Trees Tries GraphsApplying Vectors Heaps HashtablesProcess McDowell | CareerCup.com
    24. 24. Technical Skills Algorithms • Implementation • Space vs. Time Quick Sort Merge Sort ComplexityBehavioral Tree Insert / Find Binary SearchApplying Breadth-First Depth-First Search SearchProcess McDowell | CareerCup.com
    25. 25. Technical Skills Concepts • Not just a concept – know how to code!Behavioral System Design & Memory Threading Scalability ManagementApplying Probability + Recursion Bit Manipulation CombinatoricsProcess McDowell | CareerCup.com
    26. 26. Technical SkillsMastering the Interview McDowell | CareerCup.com
    27. 27. Technical Skills Technical Questions 1. Ask Questions! – Questions are more ambiguous than they appear 2. Talk out loudBehavioral – Show us how you think 3. Think critically – Does your algorithm really work? What’s the space and time complexity? 4. Code slowly and methodicallyApplying – It’s not a race 5. Test your code – And make CAREFUL fixes.Process McDowell | CareerCup.com
    28. 28. Technical Skills What does a “good coder” do? • Be methodical. Don’t try to rush. • Reasonably Bug FreeBehavioral – Thorough testing (and careful fixing) – Check for error conditions • Clean coding – Use other functionsApplying – Good use of data structures (define own if useful) – Concise and readableProcess McDowell | CareerCup.com
    29. 29. Technical Skills Types of Interview Questions Coding & Algorithms Object Oriented Design System Design “Reverse a Linked “Design a Parking “Design aBehavioral List” Lot” Web Crawler”ApplyingProcess McDowell | CareerCup.com
    30. 30. Technical Skills Types of Interview Questions Coding & Algorithms Object Oriented Design System Design Pattern MatchingBehavioral Simplify & Generalize Base Case & BuildApplying Data Structure BrainstormProcess McDowell | CareerCup.com
    31. 31. Technical Skills Algorithm Qs: Pattern Matching Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: Write code to reverse the order of wordsBehavioral 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. 32. Technical Skills Algorithm Qs: Simplify & Generalize Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: Design algorithm to figure out if you canBehavioral 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. 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. 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. 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. 36. Technical Skills Object Oriented Design Coding & Algorithms Object Oriented Design System Design Handle AmbiguityBehavioral 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. 37. Technical Skills Object Oriented Design Coding & Algorithms Object Oriented Design System Design Handle AmbiguityBehavioral 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 andApplying 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. 38. Technical Skills System Design Coding & Algorithms Object Oriented Design System Design Handle AmbiguityBehavioral What about the question is ambiguous? Make Believe Pretend there wasn’t so much data & solveApplying Get Real Go back to the real problem. What breaks? Solve Problems Solve the issues you just found.Process McDowell | CareerCup.com
    39. 39. Technical Skills System Design Coding & Algorithms Object Oriented Design System Design Handle AmbiguityBehavioral 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 documentsApplying which contain a Get Real list of words. Must split up data across machines. Solve ProblemsProcess Divide hash table by file or by keyword? McDowell | CareerCup.com
    40. 40. Technical Skills Whew! All Done! Coding & Algorithms Object Oriented Design System Design Pattern MatchingBehavioral <Gulp> This is a lot of Simplify & Generalize stuff. Do I need to get everything right? Base Case & BuildApplying Data Structure BrainstormProcess McDowell | CareerCup.com
    41. 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. 42. Technical Skills So RELAX!Behavioral Interviews are supposed to be hard! Everyone makes mistakes.Applying Everyone!Process McDowell | CareerCup.com
    43. 43. Final Thoughts McDowell | CareerCup.com
    44. 44. Technical Skills After Your Interview • Follow-up with your recruiter – No response != rejectionBehavioral • 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. 45. Technical Skills Other Resources Sold Today CareerCup.com • Interview Videos Signed (just ask!) • iPhone App • Resume Review • Mock InterviewsBehavioral today Or, stalk me online at… Rs. • twitter.com/gayle 400 • facebook.com/gayle • technologywoman.comApplying • gayle@careercup.com 5 stars!Process McDowell | CareerCup.com

    ×