• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Gayle McDowell: Cracking the coding interview
 

Gayle McDowell: Cracking the coding interview

on

  • 3,337 views

Talk video in youtube:

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

Statistics

Views

Total Views
3,337
Views on SlideShare
3,335
Embed Views
2

Actions

Likes
2
Downloads
144
Comments
0

1 Embed 2

http://www.slashdocs.com 2

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 Gayle McDowell: Cracking the coding interview Presentation Transcript

  • 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
  • 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
  • Technical Skills Slides Posted Online posted at: www.technologywoman.comBehavioral Click “Speaking Engagements”ApplyingProcess McDowell | CareerCup.com
  • Technical Skills Process Applying Evaluation Experience Structure ResumeBehavioral Soft Skills Tech SkillsApplying Preparation Preparation Interview InterviewProcess McDowell | CareerCup.com
  • Interview Process McDowell | CareerCup.com
  • Technical Skills Big Company Evaluation (Coding) Experience PersonalityBehavioral Intelligence Coding SkillsApplying Testing aptitude, not knowledgeProcess McDowell | CareerCup.com
  • 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
  • Resumes & Application Process McDowell | CareerCup.com
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.”
  • Behavioral Questions McDowell | CareerCup.com
  • 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
  • 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
  • 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
  • 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
  • Technical SkillsInterview Prep McDowell | CareerCup.com
  • 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
  • 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
  • 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
  • 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
  • Technical SkillsMastering the Interview McDowell | CareerCup.com
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • Technical Skills So RELAX!Behavioral Interviews are supposed to be hard! Everyone makes mistakes.Applying Everyone!Process McDowell | CareerCup.com
  • Final Thoughts McDowell | CareerCup.com
  • 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
  • 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