Cracking the Technical InterviewCracking the Coding InterviewGayle LaakmannFounder / CEO, CareerCup.com
My BackgroundPenn BSE / MSE ‘05 in CSEx-Engineer at Google, Microsoft and Apple		+ Offers from Amazon, IBM and others3 Years on Google Hiring CommitteeInterviewed 150+ candidates
CareerCupFounded 2005Largest source for technical interview questions (3000+ FREE questions)Services:Book (Cracking the Coding Interview)Video of interviewResume reviewMock interviews
How are interviews structured?How are you evaluated?Process
Technical Interview ProcessInitial Screen (Phone / Campus)4 - 5 on site interviews10 min General40 min Technical10 min ClosingSometimes “blind” interview
Big Company EvaluationExperiencePersonalityand…No Red Flags
What are red flags?ArroganceCommunication IssuesArguing (too much)Dishonesty
Smaller CompaniesTend to look for broader skillsCare more about experience / personalityMight ask to see “portfolio”but…It varies!
What do companies look for?Applying
What can you do?Get project experience!Course workOpen sourceIndependent studiesWeiss Tech HousePart-time jobStart a business!Know C++ or Java wellGood grades are nice – but not enough!Skills PassionWork EthicCreativityInitiative
3 Hallmarks of a Great Resume:Short and sweetOne page – no more!Short bullets (1 – 2 lines). No paragraphs!Accomplishments, not responsibilitiesQuantify!Clean, Professional and Well StructuredProjects sectionNo spelling / grammar mistakesNice resume format (don’t format via spaces!)
Why do you want to work here? What was your favorite project?Interview prep – SOFT SKILLS
Research the company / teamPrepare questions (around 10)Know:What they do (duh)Specific products – what is good / badWhat their hardest problems areWhy you want to work thereWhat value you can add (esp. if non-coding role)Soft Prep – The Company / Team
Create Preparation Grid for Projects+ (maybe) Behavioral GridSoft Prep – Yourself
Strengths vs. WeaknessesMediocre answer: “it was hard because I had to learn new languages / technologies”Not just answering Q’s – show who you are!Soft Prep – Yourself
How do you prep for coding questions?What do you prep?Interview prep – Tech SKILLS
Study the basics: CLR algorithms book is great – but too complex for interviewsWrite code on paperPut away the compilerLook up sample interview questionsFocus on the topics you’re struggling withHow to study
How to implementWhen to use (pros / cons)Data Structures
ImplementationSpace vs Time ComplexityAlgorithms
ConceptsNot just a concept – know how to code!
Don’t practice on computer!
What do companies look for?Interview – soft SKILLS
Communication TipsBe specific – not arrogant     “Yeah, I did all the hard work for the team”     “I implemented the file system, which was             considered one of the hardest components.”Be concise and structuredNugget FirstS.A.R.: Situation, Action, Result
Lead with your “thesis” / nuggetNuggets grab the listener’s attention, and tell them where you’re goingQ: What accomplishment are you most proud of?A: The time that I convinced the engineering school to switch to paperless time logs.Structure 1: Nugget First
ituationctionesultStructure 2: S.A.R.SWhat did you do? What should I care?AR
How do you tackle hard tech questions?Interview – tech SKILLS
Mastering the Technical QuestionsAsk Questions!Questions are more ambiguous than they appearTalk out loudShow us how you thinkThink criticallyDoes your algorithm really work? What’s the space and time complexity?Code slowly and methodicallyIt’s not a raceTest your codeYou’re not done until they say you’re done!
Step 1: Ask QuestionsWhat are the data types?How much data?What assumptions do you need?Who is the user?NOTE: Especially important at Microsoft.
Step 2: Think CriticallyWhat’s space / time complexity?What if there’s lots of data?Does your design cause other issues?If there are other issues, did you make the right trade offs?
Step 3: Talk Out LoudApproach is more important than answerTalking out loud:Shows us how you thinkLets the interviewer guide youMakes you not appear “stuck”
Step 4: Pseudo Code & CodePseudo code first – but say that!Use data structures generouslyWhat are the right ones?Define your own = shows good styleDon’t crowd your codingStart in the upper left corner of board, not bottom
Step 5: TestingTest your code!Extreme casesCheck for user errorTest general casesCAREFULLY FIX MISTAKES
RELAX!Interviews are supposed to be hard!Everyone makes mistakes.  Everyone!
Question TypesStandard Coding and Algorithms“Reverse a linked list”Object Oriented Design“Design a parking lot”Large System Design“Design a program to crawl the web”Trivia“What does a “vtable” refer to in C++”
Standard Coding and AlgorithmsQuestion Type #1
Algorithm Generation#1Standard Coding and AlgorithmsOMG!  I have no idea how to solve this problem!
Algorithm GenerationPattern MatchingWhat problem is this similar to?Simplify / GeneralizeWhat if the data was a different type?Base Case & BuildCan you do this just for element 1? 1 and 2? …Data Structure BrainstormGo through all data structures – can they help?#1Standard Coding and Algorithms
Algorithm GenerationPattern MatchingWrite code to reverse the order of words in a sentence.	Example:		input: “she ran to the store”		output: “store the to ran she”#1Standard Coding and Algorithms
Algorithm GenerationSimplify / GeneralizeWrite a program to remove the duplicate characters in a string without using any additional buffers.#1Standard Coding and Algorithms
Algorithm GenerationBase Case & BuildDesign an algorithm to print all subsets of a set (e.g., the power set)	Example:		input: 	{a, b, c}		output: 	{{}, {a}, {b}, {c}, {a, b}, {a, c}, 			{b, c},  {a, b, c}}#1Standard Coding and Algorithms
Algorithm GenerationData Structures BrainstormDesign an algorithm to figure out if someone has won a game of tic-tac-toe.  Make it as fast as possible.#1Standard Coding and Algorithms
Object Oriented DesignQuestion Type #2
Core objectswhat are the core objects?Relationshipswhat is their relationship to each other?Interactionshow do they interact?Algorithms	what are the tricky / interesting algorithms?OOD Steps (C.R.I.A.)#2Object Oriented Design
OOD Example#2Object Oriented DesignDesign the data structures for a restaurant
Restaurant OOD#2Object Oriented Design1. Core ObjectsGuestPartyServerTableMealOrder
Restaurant OOD#2Object Oriented Design2. RelationshipsEach party has many guests. Each guest has one party. (“One to many”)
Restaurant OOD#2Object Oriented Design3. InteractionsParty enters with Guest(s). Host assigns Party to Table.
Restaurant OOD#2Object Oriented Design4. AlgorithmsHow do you find a free table?
Large ScaleSystem DesignQuestion Type #3
Large Scale Steps#3Large Scale System DesignSimplifyGeneralizeGeneralize to more data:find & solve problemsSolve for simple case (less data)
TriviaQuestion Type #4
Trivia#4TriviaHopefully you know the answer!Practice more Else…Admit that you don’t knowTry to derive the answer
(eg, things that wouldn’t fit in elsewhere)FINAL THOUGHTS
The Interview: Ending ItSmile, be positiveIf you think you bombed, don’t worryFollow up with your recruiters (sometimes they forget)
The OfferIt’s always negotiableHelps if you have competing offerDon’t lie – companies know what competitors offerNegotiate on multiple factors (salary, signing bonus, stock, etc)Is it really what you want?Money, career options, etc
My Red Flags: People who…… didn’t test their code… found mistakes and would make random fixes… messy code (lack of data structures / redundant code)… didn’t consider the impact of their algorithms… were scared to try
Take Aways – Getting ReadyGet Project ExperienceShow project experience on resumeS. A. R. (Situation Action Result)Prepare Project / Behavioral Grids
Technical Interview PrepThings to know (data structures, algorithms, concepts)Simple  Know ImplementationComplex  Know ConceptsPractice interview questions!
At The Interview	Be niceRELAX!  Interviews are supposed to be hardApproachesPattern MatchingSimplify / GeneralizeBase Case & BuildData Structure Brainstorm
Other ResourcesBook (sold today - $20)Interview videoMock InterviewsResume ReviewSlides posted at CareerCup.com/slides#1 book for interviewing on Amazon!PS: CareerCup is hiring a part-time dev!(remember that part about needing coding experience?)If you know Ruby on Rails (or even if you don’t), contact gayle@careercup.com.

Cracking the coding interview u penn - sept 30 2010

  • 1.
    Cracking the TechnicalInterviewCracking the Coding InterviewGayle LaakmannFounder / CEO, CareerCup.com
  • 2.
    My BackgroundPenn BSE/ MSE ‘05 in CSEx-Engineer at Google, Microsoft and Apple + Offers from Amazon, IBM and others3 Years on Google Hiring CommitteeInterviewed 150+ candidates
  • 3.
    CareerCupFounded 2005Largest sourcefor technical interview questions (3000+ FREE questions)Services:Book (Cracking the Coding Interview)Video of interviewResume reviewMock interviews
  • 5.
    How are interviewsstructured?How are you evaluated?Process
  • 6.
    Technical Interview ProcessInitialScreen (Phone / Campus)4 - 5 on site interviews10 min General40 min Technical10 min ClosingSometimes “blind” interview
  • 7.
  • 8.
    What are redflags?ArroganceCommunication IssuesArguing (too much)Dishonesty
  • 9.
    Smaller CompaniesTend tolook for broader skillsCare more about experience / personalityMight ask to see “portfolio”but…It varies!
  • 10.
    What do companieslook for?Applying
  • 11.
    What can youdo?Get project experience!Course workOpen sourceIndependent studiesWeiss Tech HousePart-time jobStart a business!Know C++ or Java wellGood grades are nice – but not enough!Skills PassionWork EthicCreativityInitiative
  • 12.
    3 Hallmarks ofa Great Resume:Short and sweetOne page – no more!Short bullets (1 – 2 lines). No paragraphs!Accomplishments, not responsibilitiesQuantify!Clean, Professional and Well StructuredProjects sectionNo spelling / grammar mistakesNice resume format (don’t format via spaces!)
  • 13.
    Why do youwant to work here? What was your favorite project?Interview prep – SOFT SKILLS
  • 14.
    Research the company/ teamPrepare questions (around 10)Know:What they do (duh)Specific products – what is good / badWhat their hardest problems areWhy you want to work thereWhat value you can add (esp. if non-coding role)Soft Prep – The Company / Team
  • 15.
    Create Preparation Gridfor Projects+ (maybe) Behavioral GridSoft Prep – Yourself
  • 16.
    Strengths vs. WeaknessesMediocreanswer: “it was hard because I had to learn new languages / technologies”Not just answering Q’s – show who you are!Soft Prep – Yourself
  • 17.
    How do youprep for coding questions?What do you prep?Interview prep – Tech SKILLS
  • 18.
    Study the basics:CLR algorithms book is great – but too complex for interviewsWrite code on paperPut away the compilerLook up sample interview questionsFocus on the topics you’re struggling withHow to study
  • 19.
    How to implementWhento use (pros / cons)Data Structures
  • 20.
    ImplementationSpace vs TimeComplexityAlgorithms
  • 21.
    ConceptsNot just aconcept – know how to code!
  • 22.
  • 23.
    What do companieslook for?Interview – soft SKILLS
  • 24.
    Communication TipsBe specific– not arrogant “Yeah, I did all the hard work for the team” “I implemented the file system, which was considered one of the hardest components.”Be concise and structuredNugget FirstS.A.R.: Situation, Action, Result
  • 25.
    Lead with your“thesis” / nuggetNuggets grab the listener’s attention, and tell them where you’re goingQ: What accomplishment are you most proud of?A: The time that I convinced the engineering school to switch to paperless time logs.Structure 1: Nugget First
  • 26.
    ituationctionesultStructure 2: S.A.R.SWhatdid you do? What should I care?AR
  • 27.
    How do youtackle hard tech questions?Interview – tech SKILLS
  • 28.
    Mastering the TechnicalQuestionsAsk Questions!Questions are more ambiguous than they appearTalk out loudShow us how you thinkThink criticallyDoes your algorithm really work? What’s the space and time complexity?Code slowly and methodicallyIt’s not a raceTest your codeYou’re not done until they say you’re done!
  • 29.
    Step 1: AskQuestionsWhat are the data types?How much data?What assumptions do you need?Who is the user?NOTE: Especially important at Microsoft.
  • 30.
    Step 2: ThinkCriticallyWhat’s space / time complexity?What if there’s lots of data?Does your design cause other issues?If there are other issues, did you make the right trade offs?
  • 31.
    Step 3: TalkOut LoudApproach is more important than answerTalking out loud:Shows us how you thinkLets the interviewer guide youMakes you not appear “stuck”
  • 32.
    Step 4: PseudoCode & CodePseudo code first – but say that!Use data structures generouslyWhat are the right ones?Define your own = shows good styleDon’t crowd your codingStart in the upper left corner of board, not bottom
  • 33.
    Step 5: TestingTestyour code!Extreme casesCheck for user errorTest general casesCAREFULLY FIX MISTAKES
  • 34.
    RELAX!Interviews are supposedto be hard!Everyone makes mistakes. Everyone!
  • 35.
    Question TypesStandard Codingand Algorithms“Reverse a linked list”Object Oriented Design“Design a parking lot”Large System Design“Design a program to crawl the web”Trivia“What does a “vtable” refer to in C++”
  • 36.
    Standard Coding andAlgorithmsQuestion Type #1
  • 37.
    Algorithm Generation#1Standard Codingand AlgorithmsOMG! I have no idea how to solve this problem!
  • 38.
    Algorithm GenerationPattern MatchingWhatproblem is this similar to?Simplify / GeneralizeWhat if the data was a different type?Base Case & BuildCan you do this just for element 1? 1 and 2? …Data Structure BrainstormGo through all data structures – can they help?#1Standard Coding and Algorithms
  • 39.
    Algorithm GenerationPattern MatchingWritecode to reverse the order of words in a sentence. Example: input: “she ran to the store” output: “store the to ran she”#1Standard Coding and Algorithms
  • 40.
    Algorithm GenerationSimplify /GeneralizeWrite a program to remove the duplicate characters in a string without using any additional buffers.#1Standard Coding and Algorithms
  • 41.
    Algorithm GenerationBase Case& BuildDesign an algorithm to print all subsets of a set (e.g., the power set) Example: input: {a, b, c} output: {{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}#1Standard Coding and Algorithms
  • 42.
    Algorithm GenerationData StructuresBrainstormDesign an algorithm to figure out if someone has won a game of tic-tac-toe. Make it as fast as possible.#1Standard Coding and Algorithms
  • 43.
  • 44.
    Core objectswhat arethe core objects?Relationshipswhat is their relationship to each other?Interactionshow do they interact?Algorithms what are the tricky / interesting algorithms?OOD Steps (C.R.I.A.)#2Object Oriented Design
  • 45.
    OOD Example#2Object OrientedDesignDesign the data structures for a restaurant
  • 46.
    Restaurant OOD#2Object OrientedDesign1. Core ObjectsGuestPartyServerTableMealOrder
  • 47.
    Restaurant OOD#2Object OrientedDesign2. RelationshipsEach party has many guests. Each guest has one party. (“One to many”)
  • 48.
    Restaurant OOD#2Object OrientedDesign3. InteractionsParty enters with Guest(s). Host assigns Party to Table.
  • 49.
    Restaurant OOD#2Object OrientedDesign4. AlgorithmsHow do you find a free table?
  • 50.
  • 51.
    Large Scale Steps#3LargeScale System DesignSimplifyGeneralizeGeneralize to more data:find & solve problemsSolve for simple case (less data)
  • 52.
  • 53.
    Trivia#4TriviaHopefully you knowthe answer!Practice more Else…Admit that you don’t knowTry to derive the answer
  • 54.
    (eg, things thatwouldn’t fit in elsewhere)FINAL THOUGHTS
  • 55.
    The Interview: EndingItSmile, be positiveIf you think you bombed, don’t worryFollow up with your recruiters (sometimes they forget)
  • 56.
    The OfferIt’s alwaysnegotiableHelps if you have competing offerDon’t lie – companies know what competitors offerNegotiate on multiple factors (salary, signing bonus, stock, etc)Is it really what you want?Money, career options, etc
  • 57.
    My Red Flags:People who…… didn’t test their code… found mistakes and would make random fixes… messy code (lack of data structures / redundant code)… didn’t consider the impact of their algorithms… were scared to try
  • 58.
    Take Aways –Getting ReadyGet Project ExperienceShow project experience on resumeS. A. R. (Situation Action Result)Prepare Project / Behavioral Grids
  • 59.
    Technical Interview PrepThingsto know (data structures, algorithms, concepts)Simple  Know ImplementationComplex  Know ConceptsPractice interview questions!
  • 60.
    At The Interview BeniceRELAX! Interviews are supposed to be hardApproachesPattern MatchingSimplify / GeneralizeBase Case & BuildData Structure Brainstorm
  • 61.
    Other ResourcesBook (soldtoday - $20)Interview videoMock InterviewsResume ReviewSlides posted at CareerCup.com/slides#1 book for interviewing on Amazon!PS: CareerCup is hiring a part-time dev!(remember that part about needing coding experience?)If you know Ruby on Rails (or even if you don’t), contact gayle@careercup.com.

Editor's Notes

  • #15 What you want to know:How much time do you spend coding per day? In meetings?How does code get shipped?Insightful QuestionsI noticed that Google Talk uses the XMPP standard, and …Passion QuestionsI love learning about scalable systems. What are opportunities at Google?
  • #20 Hashtables – super important!!!
  • #22 Bit manipulation – super important!Recursion: how does recursion impact space and time?Practice converting from iterative into recursion