690 likes | 794 Views
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. My Background. Software Engineer @ Google, Microsoft & Apple
E N D
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 | CareerCup.com | Hackbright July 2013
My Background • Software Engineer @ Google, Microsoft & Apple • 3 Years on Google Hiring Committee • Interviewed 150+ candidates • Founder of CareerCup.com • Author • Cracking the Coding Interview • The Google Resume McDowell | CareerCup.com
What to Expect • 5 - 10 min – Qs about resume • 40 min – technical Qs • Coding and algorithms • 5 – 10 min – let you ask Qs, general wrap up, etc McDowell | CareerCup.com
Big Company Evaluation (Devs) Testing aptitude, not knowledge McDowell | CareerCup.com
Start-Ups • Coding + Intelligence • “Hit the ground running” • Do you know “their” technologies? • Entrepreneurial • Have you started things? • How much direction do you need? • Personality • Will you fit with the team? but… it varies! McDowell | CareerCup.com
PM Roles • Communication Skills • User-Focused Thinking • Passion for Technology • Analytical Skills • Technical Skills (position dependent) McDowell | CareerCup.com
How You Are Judged How did you do RELATIVE to other candidates on the SAME question? It’s not about how quickly you solved the problem… … it’s about how quickly you solved it relative to other candidates. McDowell | CareerCup.com
Resumes & Application Process McDowell | CareerCup.com
How to Get an Interview • Your “Pedigree” • Education • Work Experience • Projects • Github / Online Profile • Make a kick-ass resume McDowell | CareerCup.com
How We Review Resumes • Pull resume out of giant stack • Spot-check: company names, positions, projects, schools. • Skim bullets to see if you’ve written real code. “Glanced at,” not read. 15 – 30 seconds Reject Interview • Go to next resume & whine about how many more you have left. McDowell | CareerCup.com
How CS Resume Should Look Observe: No Objective! Objectives / summaries are almost always useless. One Page Only! Unless > 10 years exp. A Real Resume Format with organized columns Short (1 – 2 line bullets) Focus on Accomplishments not responsibilities GPAif at least 3.0 max (in-major, overall) 3 – 4 Projects Courses & independent Finished or unfinished List of Technical Skills Short! Cut the “fluff.”
Talking to Recruiters • Show: • What you’ve done (mobile app? Show it!) • What you’re excited about • Have a “pitch” ready • Weird is okay • (arrogant is not) McDowell | CareerCup.com
Soft Questions McDowell | CareerCup.com
Goals of Your Answer • Answer the question. • Deliver a goodanswer. • Communicate well. • Nugget First • S.A.R.: Situation, Action, Result McDowell | CareerCup.com
Preparing for Behavioral Qs • Create Preparation Grid for Projects + Behavioral Grid [for PM & less tech. roles] McDowell | CareerCup.com
Structure 1: Nugget First • Lead with your “thesis” / nugget • Grabs the listener’s attention • Gives them context for where you’re going. Q: What accomplishment are you most proud of? A: I’m most proud of the way I re-architected the … McDowell | CareerCup.com
Structure 2: S.A.R. ituation ction esult S What was the issue? A What did you do about it? R What was the impact? McDowell | CareerCup.com
Good Questions for Interviewer • Qs you want to get answered • How decisions get made • Interaction betwdevs, PMs, testers • Qs that show interest / passion • What’s the architecture like? • Qs that show knowledge / aptitude • How did you solve problem with ___? Don’t worry too much about this stuff McDowell | CareerCup.com
Technical SkillsInterview Prep McDowell | CareerCup.com
How to study • Study the basics • Complex algorithms generally unnecessary. • Practice solving questions • Don’t memorize! • See: CtCI & CareerCup.com • Push yourself! • Write code on paper McDowell | CareerCup.com
Data Structures • How to implement • When to use (pros / cons) McDowell | CareerCup.com
Algorithms • Implementation • Space vs. Time Complexity McDowell | CareerCup.com
Concepts • Not just a concept – know how to code! McDowell | CareerCup.com
How to Learn CS Fundamentals? • Necessary for “elite” tech companies • Not necessarily otherwise (check interview questions) • MIT Open Courseware • Freshman / sophomore level DS & Algo courses • Books • CLRS (Algorithms) • Online tutorials • Practice implementing and using McDowell | CareerCup.com
Technical SkillsMastering the Interview McDowell | CareerCup.com
Types of “Serious” Questions • Product Design Questions • Estimation Questions • Software Engineering Questions • Coding & Algorithms • Object Oriented Design • Scalability • Factual / Trivia / Language-Based McDowell | CareerCup.com
Product Design Questions How would you design an calculator for the blind? Design an elevator for a building. Pick a Google product. How would you improve it?
Product Design Questions: Why? • Communication & Structured Thinking • Ability to understand the user • Creativity • Business instincts / skills
Product Design Qs: Approach • Ask questions to resolve ambiguity • Understand the user • Structure the problem • Solve piece by piece
Product Design Qs: Example How would you design a calculator for the blind? Step 1: Ask Questions • Adults? Children? Professionals? • Where are they using it? • School, work, etc.
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? • Keeping up with the rest of the class • Not feeling “different” • Efficient input / output • What about teachers, parents, classmates, etc.?
Product Design Qs: Example How would you design a calculator for the blind? Step 3: Structure • Find a structure • Otherwise, you’re just blabbering • One approach: • Make list of functions necessary • Discuss how to do input / output • Usability for non-blind • Summary
Product Design Qs: Example How would you design a calculator for the blind? Step 4: Solve!
Estimation Questions How many tennis balls can fit in an SUV? How much money does Gmail make from ads every year? How much do New Yorkers spend on electricity each year?
Estimation Qs: Why? • Problem Solving • Basic Quantitative Skills
Estimation Qs: How to Approach • Ask questions to resolve ambiguity • Don’t make assumptions (yet) • Outline / Structure Your Approach • Break down the components • Assume numbers when necessary • State assumptions explicitly • Round numbers to make your math easier • Sanity Check • Do your numbers make sense?
Estimation Qs: Example How much money does Gmail make from ads every year? Step 1: Ambiguous Information • Profit or revenue? • Past year? Or average over history? • Gmail only? Or include Google Apps?
Estimation Qs: Example How much money does Gmail make from ads every year? Step 2: Outline Your Approach (# of users) x (# clicks / year) x ( $ / click )
Estimation Qs: Example How much money does Gmail make from ads every year? Step 3: Break down components Estimate # of Gmail users in the US • Assume 300 million people in the US. • Exclude 0 - 12 years old and 65 - 75 years old • ~ 200 million • Assume 80% of people use email • 80% of those have non-work account … and so on …
Estimation Qs: Example How much money does Gmail make from ads every year? Step 4: Validate Numbers • Could revenue be $5 billion? • No, because… • Google’s annual revenue is ~$40 billion • $16 / US citizen (not just Gmail users)
CS Questions • Knowledge Questions • Coding & Algorithms • Object Oriented Design • Scalability McDowell | CareerCup.com
Knowledge & Trivia Questions • Not key focus at “elite” tech companies. • If asked, tends to focus more on DS knowledge than language knowledge • If you don’t know, try to deduce the answer • How would language designer do it? etc McDowell | CareerCup.com
Coding & Algorithm Questions • Ask Questions! • Questions are more ambiguous than they appear • Talk out loud • Show us how you think • Think critically • Does your algorithm really work? What’s the space and time complexity? • Code slowly and methodically • It’s not a race • Test your code • And make CAREFUL fixes. If you’ve heard a question before, admit it. McDowell | CareerCup.com
What does a “good coder” do? • Be methodical. Don’t try to rush. • Reasonably Bug Free • Thorough testing (and careful fixing) • Check for error conditions • Clean coding • Use other functions • Good use of data structures (define own if useful) • Concise and readable McDowell | CareerCup.com
Whiteboard Coding Tips • Code in the FAR top left corner • Write small & straight • Pseudocode if you’d like • Use arrows to insert new code snippets • Erasing wastes time • Use “good” variable names, then abbreviate • “Breadth-First” Coding McDowell | CareerCup.com
“Breath-First” Coding • Divide problems into sub-components • Modularize & Structure • Ex: Ransom Note • Write as one big function? • OR… modularize! McDowell | CareerCup.com
Ex: Ransom Note: “Depth-First” Coding McDowell | CareerCup.com
Ex: Ransom Note: “Breadth-First” Coding McDowell | CareerCup.com
Ex: Ransom Note: “Breadth-First” Coding McDowell | CareerCup.com
Ex: Ransom Note: “Breadth-First” Coding McDowell | CareerCup.com