Cracking the oding interview code chix - oct 2012

545 views
525 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
545
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
2
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
  • Cracking the oding interview code chix - oct 2012

    1. 1. Cracking the Coding Interview Advice and Strategies for Software Engineering and PM Interviews Gayle Laakmann McDowell Founder / CEO, CareerCup.comAuthor of The Google Resume and Cracking the Coding Interview McDowell | CareerCup.com | Women Who Code Aug 2012
    2. 2. Technical Skills My Background • Software Engineer @ GOOG, MS & Apple – 3 Years on Google Hiring CommitteeBehavioral – Interviewed 150+ candidates • Founder of CareerCup.com – 8000+ tech interview questionsApplying • Author – 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 “Elite” Tech Companies Experience PersonalityBehavioral Intelligence Coding SkillsApplying Testing aptitude, not knowledgeProcess McDowell | CareerCup.com
    7. 7. Technical Skills Start-Ups • Coding + Intelligence • “Hit the ground running”Behavioral – Do you know “their” technologies? • Entrepreneurial – Have you started things?Applying – How much direction do you need? but… • Personality it varies! – Will you fit with the team?Process McDowell | CareerCup.com
    8. 8. Technical Skills PM Roles • Communication Skills • User-Focused ThinkingBehavioral • Passion for Technology • Analytical Skills • Technical Skills (position dependent)ApplyingProcess McDowell | CareerCup.com
    9. 9. 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
    10. 10. Resumes & Application Process McDowell | CareerCup.com
    11. 11. Technical Skills How to Get an Interview • Your “Pedigree” – EducationBehavioral – Work Experience – Projects – Github / Online Profile • Make an awesome resumeApplyingProcess McDowell | CareerCup.com
    12. 12. Technical Skills How We Review Resumes 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
    13. 13. How CS Resume Should Look 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 if at least 3.0max (in-major, overall) 3 – 4 Projects Courses & independent Finished or unfinishedList of Technical Skills Short! Cut the “fluff.”
    14. 14. Technical Skills Talking to Recruiters • Show: – What you’ve done (mobile app? Show it!)Behavioral – What you’re excited about • Have a “pitch” ready • Weird is okayApplying – (arrogant is not)Process McDowell | CareerCup.com
    15. 15. Behavioral Questions McDowell | CareerCup.com
    16. 16. Technical Skills Communication Goals • Answer the question. • Deliver a *good* answer.Behavioral • Communicate well.ApplyingProcess McDowell | CareerCup.com
    17. 17. 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
    18. 18. 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
    19. 19. 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
    20. 20. Technical SkillsInterview Prep McDowell | CareerCup.com
    21. 21. 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
    22. 22. 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
    23. 23. 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
    24. 24. 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
    25. 25. Technical Skills How to Learn CS Fundamentals? • Necessary for “elite” tech companies – Not necessarily otherwise (check interview questions)Behavioral • MIT Open Courseware – Freshman / sophomore level DS & Algo courses • BooksApplying – CLRS (Algorithms) • Online tutorials • Practice implementing and usingProcess McDowell | CareerCup.com
    26. 26. Technical SkillsMastering the Interview McDowell | CareerCup.com
    27. 27. Technical Types of “Serious” Questions 1. Product Design Questions 2. Estimation Questions 3. Software Engineering QuestionsEstimation – Coding & Algorithms – Object Oriented Design – Scalability – Factual / Trivia / Language-BasedProduct Design McDowell | CareerCup.com
    28. 28. Technical Product Design Questions How would you design an calculator for the blind?Estimation Design an elevator for a building. Pick a Google product.Product Design How would you improve it?
    29. 29. Technical Product Design Questions: Why? • Communication & Structured Thinking • Ability to understand the user • CreativityEstimation • Business instincts / skillsProduct Design
    30. 30. Technical Product Design Qs: Approach 1. Ask questions to resolve ambiguity 2. Understand the user 3. Structure the problemEstimation 4. Solve piece by pieceProduct Design
    31. 31. Technical Product Design Qs: Example How would you design a calculator for the blind? Step 1: Ask Questions • Adults? Children? Professionals?Estimation • Where are they using it? – School, work, etc.Product Design
    32. 32. Technical Product Design Qs: Example How would you design a calculator for the blind? Step 2: Understand the User • What’s important to a blind child?Estimation – Keeping up with the rest of the class – Not feeling “different” – Efficient input / output • What about teachers, parents,Product Design classmates, etc.?
    33. 33. Technical Product Design Qs: Example How would you design a calculator for the blind? Step 3: Structure • Find a structureEstimation – Otherwise, you’re just blabbering • One approach: 1. Make list of functions necessary 2. Discuss how to do input / outputProduct Design 3. Usability for non-blind 4. Summary
    34. 34. Technical Product Design Qs: Example How would you design a calculator for the blind? Step 4: Solve!EstimationProduct Design
    35. 35. Technical Estimation Questions How many tennis balls can fit in an SUV?Estimation How much money does Gmail make from ads every year? How much do New YorkersProduct Design spend on electricity each year?
    36. 36. Technical Estimation Qs: Why? • Problem Solving • Basic Quantitative SkillsEstimationProduct Design
    37. 37. Technical Estimation Qs: How to Approach 1. Ask questions to resolve ambiguity – Don’t make assumptions (yet) 2. Outline / Structure Your Approach 3. Break down the componentsEstimation – Assume numbers when necessary – State assumptions explicitly – Round numbers to make your math easier 4. Sanity CheckProduct Design – Do your numbers make sense?
    38. 38. Technical Estimation Qs: Example How much money does Gmail make from ads every year? Step 1: Ambiguous Information • Profit or revenue?Estimation • Past year? Or average over history? • Gmail only? Or include Google Apps?Product Design
    39. 39. Technical Estimation Qs: Example How much money does Gmail make from ads every year? Step 2: Outline Your Approach (# of users)Estimation x (# clicks / year) x ( $ / click )Product Design
    40. 40. Technical Estimation Qs: Example How much money does Gmail make from ads every year? Step 3: Break down components Estimate # of Gmail users in the USEstimation 1. Assume 300 million people in the US. – Exclude 0 - 12 years old and 65 - 75 years old –  ~ 200 million 2. Assume 80% of people use email 3. 80% of those have non-work accountProduct Design … and so on …
    41. 41. Technical Estimation Qs: Example How much money does Gmail make from ads every year? Step 4: Validate Numbers • Could revenue be $5 billion?Estimation • No, because… – Google’s annual revenue is ~$40 billion – $16 / US citizen (not just Gmail users)Product Design
    42. 42. Technical How to Solve Tough Problems 1. Ask Questions! – Questions are more ambiguous than they appear 2. Talk out loud – Show us how you thinkEstimation 3. Think critically – Does your algorithm really work? What’s the space and time complexity? 4. Code slowly and methodically – It’s not a race 5. Test your codeProduct Design – And make CAREFUL fixes. McDowell | CareerCup.com
    43. 43. Technical What does a “good coder” do? • Code in top-left of whiteboard • Pseudocode first (if necessary) • Be methodical. Don’t try to rush.Estimation • Reasonably Bug Free – Thorough testing (and careful fixing) – Check for error conditions • Clean coding – Use other functionsProduct Design – Good use of data structures (define own if useful) – Concise and readable McDowell | CareerCup.com
    44. 44. Technical Types of Interview Questions Coding & Algorithms Object Oriented Design System Design Pattern MatchingEstimation Simplify & Generalize Base Case & Build Data Structure BrainstormProduct Design McDowell | CareerCup.com
    45. 45. Technical Algorithm Qs: Pattern Matching Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: Write code to reverse the order of words in a sentence.Estimation Simplify & Generalize “dogs are cute” “cute are dogs” Base Case & Build Similar to: reverse characters in a string. “dogs are cute” Data Structure “etuc era sgod” BrainstormProduct Design A: Reverse full string, then reverse each word. McDowell | CareerCup.com
    46. 46. Technical Algorithm Qs: Simplify & Generalize Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: Design algorithm to figure out if you can build a ransom note (array of strings) from aEstimation Simplify & Generalize magazine (array of strings). Simplify: what if we used characters instead Base Case & Build of strings?  Build array of character frequencies. Data Structure BrainstormProduct Design Generalize: how we can extend answer to words? A: Build hashtable from word to frequency. McDowell | CareerCup.com
    47. 47. Technical Algorithm Qs: Base Case & Build Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: Design algorithm to print subsets of set. {a, b, c}  {}, {a}, {b}, {c}, {a, b},Estimation Simplify & Generalize {a, c}, {b, c}, {a, b, c} S({})  {} Base Case & Build S({a})  {}, {a} S({a, b})  {}, {a}, {b}, {a, b} Data Structure S({a, b, c}) ? BrainstormProduct Design A: Build S(n) by cloning S(n-1) and adding n to the cloned sets. McDowell | CareerCup.com
    48. 48. Technical Algorithm Qs: Data Structure Brainstorm Coding & Algorithms Object Oriented Design System Design Pattern Matching Q: There are 10^10 possible phone #s. Explain how you could efficiently implementEstimation Simplify & Generalize assignSpecificNum(num) and assignAnyAvailableNum(). Base Case & Build Array (sorted)? Too slow to remove num. Linked list? Too slow to find specific num. Data Structure Hash table? Can’t iterate through free nums. Brainstorm Tree? Ah-ha!Product Design A: Store free #s in BST. Remove when taken. McDowell | CareerCup.com
    49. 49. Technical How To Solve Algorithm Questions Coding & Algorithms Object Oriented Design System Design Pattern Matching Compare to similar problems.Estimation Simplify & Generalize Solve first for a simplified / tweaked problem. Base Case & Build Solve for n = 1, and build solution for n = 2. Data Structure Brainstorm Try to apply data structure to solve problem.Product Design McDowell | CareerCup.com
    50. 50. Technical Whew! All Done! Coding & Algorithms Object Oriented Design System Design Pattern Matching <Gulp> This is a lot ofEstimation Simplify & Generalize stuff. Do I need to get everything right? Base Case & Build Data Structure BrainstormProduct Design McDowell | CareerCup.com
    51. 51. 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
    52. 52. Technical Skills So RELAX!Behavioral Interviews are supposed to be hard! Everyone makes mistakes.Applying Everyone!Process McDowell | CareerCup.com
    53. 53. Final Thoughts McDowell | CareerCup.com
    54. 54. 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
    55. 55. Technical Skills Other Resources Sold Today CareerCup.com • Interview Videos Signed! {ask to add your name too} • iPhone App • Resume Review 5 stars! • Mock InterviewsBehavioral today $15 Or, stalk me online at… • twitter.com/gayle • facebook.com/gayle • technologywoman.comApplying • gayle@careercup.com today $25Process McDowell | CareerCup.com

    ×