Surviving & Thriving inTechnical InterviewsMaking your brain dohard things whileunder pressure
Surviving & Thriving inTechnical InterviewsMaking your brain dohard things whileunder pressureWhy is itso hard?!
What Are Interviewers Looking For?ü  Ability to solve problemsü  Technical skillsü  Soft Skillsü  Team Fit
§  Understand the problem§  Think logically§  Explain Yourself§  Propose a solution§  Analyze solution§  Make improv...
§  Domain-specific Knowledge§  Data Structures§  Algorithms§  Design Patterns§  Dealing with Large Data SetsTechnical...
§  Array§  Hash Map§  Linked List§  Stack§  Queue§  Tree§  Heap§  Graph§  Searching§  Linear Search§  Binary Se...
§  Used to classify algorithms by their timecomplexity – how their processing timeis affected by input size.§  Basic Cla...
§  The amount of memory cells analgorithm needs.§  Often have to evaluatetradeoffs betweenspace and timecomplexity§  Do...
§  Communication§  Teamwork§  Leadership§  Confidence§  ResponsibilitySee Amazon Leadership Principles - http://amzn....
Technical InterviewQuestion Examples
I dont mind doing interviews. I dontmind answering thoughtfulquestions. But Im not thrilled aboutanswering questions like,...
Example #1 – The Raffle§  Tickets are numbered from 1 to 1,000,000§  Select 700,000 random winners§  No duplicates
The Raffle – Solution #1$winners	  =	  array_rand(	  	  array_fill_keys(range(1,	  1000000),	  true),	  	  700000	  );	  
The Raffle – Solution #1PROS§  Succinct§  Uses native functions§  Pretty fast§  O(n)	  $winners	  =	  array_rand(array...
The Raffle – Solution #1PROS§  Succinct§  Uses native functions§  Pretty fast§  O(n)	  CONS§  Memory hog!§  Crashes ...
The Raffle – Solution #2$winners	  =	  array();	  for	  ($i	  =	  1;	  $i	  <=	  700000;	  $i++)	  {	  	  	  	  $n	  =	  m...
The Raffle – Solution #2$winners	  =	  array();	  for	  ($i	  =	  1;	  $i	  <=	  700000;	  $i++)	  {	  	  	  	  	  $n	  =	...
The Raffle – Solution #3$winners	  =	  range(1,	  1000000);	  shuffle($winners);	  $winners	  =	  array_slice($winners,	  ...
CONS§  More random than #1,but not as random as #2PROS§  Fast§  O(n)§  Low memoryThe Raffle – Solution #3$winners	  =	...
The Raffle – Follow UpWhat if there were1,000,000,000 tickets?
The Raffle – Follow UpWhat if there were1,000,000,000 tickets?php	  >	  $r	  =	  range(1,	  1000000000);	  PHP	  Fatal	  e...
Example #2 – Odd Duck§  Input: an array of non-negative integers§  Integers in the array all existan even number of time...
Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?
Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?§  Is an empty ...
Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?§  Is an empty ...
Odd Duck – Exercise
Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice...
Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice...
Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice...
Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice...
Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice...
Preparation and Tips
Preparing for the Questions§  Research your potential employer§  Be familiar with your own résumé§  Review the job desc...
Behavioral Questions§  Questions related to past experiences§  "Give me an example of a time when…"§  "Tell me about so...
Physical Preparations§  Be well-rested§  Arrive early§  Use the restroom before the interview§  Turn off your phone§ ...
Interview Tips§  Dont Panic§  Ask Questions§  Dont Be Evasive§  ShowYour Skills§  Be Positive§  Learn Something
Any Questions?Presentation byJeremy Lindblom@jeremeamiaThanks!
Upcoming SlideShare
Loading in...5
×

Surviving and Thriving in Technical Interviews

190

Published on

Technical interviews can a difficult and stressful part of finding employment. Regardless of whether or not you receive the job offer, you can make the technical interview process a good experience every time. In this session, you will learn some tips for your next technical interview, and also analyze some example interview and coding questions to learn how to think about and answer questions in a way that shows off your abilities.

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

  • Be the first to like this

No Downloads
Views
Total Views
190
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Surviving and Thriving in Technical Interviews

  1. 1. Surviving & Thriving inTechnical InterviewsMaking your brain dohard things whileunder pressure
  2. 2. Surviving & Thriving inTechnical InterviewsMaking your brain dohard things whileunder pressureWhy is itso hard?!
  3. 3. What Are Interviewers Looking For?ü  Ability to solve problemsü  Technical skillsü  Soft Skillsü  Team Fit
  4. 4. §  Understand the problem§  Think logically§  Explain Yourself§  Propose a solution§  Analyze solution§  Make improvements§  Handle changes or constraintsAbility to Solve Problems
  5. 5. §  Domain-specific Knowledge§  Data Structures§  Algorithms§  Design Patterns§  Dealing with Large Data SetsTechnical Skills
  6. 6. §  Array§  Hash Map§  Linked List§  Stack§  Queue§  Tree§  Heap§  Graph§  Searching§  Linear Search§  Binary Search§  Sorting§  Selection Sort§  Insertion Sort§  Merge Sort§  Quicksort§  Bucket SortData Structures & Algorithms
  7. 7. §  Used to classify algorithms by their timecomplexity – how their processing timeis affected by input size.§  Basic Classifications:Big-O Notation & Time Complexity§ Constant – O(1) or O(c)  § Logarithmic – O(log  n)  § Linear – O(n)  § Linearithmic – O(n  log  n)  § Quadratic – O(n2)  § Polynomial – O(nc)  § Exponential – O(cn)  § Factorial – O(n!)  
  8. 8. §  The amount of memory cells analgorithm needs.§  Often have to evaluatetradeoffs betweenspace and timecomplexity§  Doing things "in-place" or notSpace Complexity
  9. 9. §  Communication§  Teamwork§  Leadership§  Confidence§  ResponsibilitySee Amazon Leadership Principles - http://amzn.to/Qb6JB6Soft Skills
  10. 10. Technical InterviewQuestion Examples
  11. 11. I dont mind doing interviews. I dontmind answering thoughtfulquestions. But Im not thrilled aboutanswering questions like, If youwere being mugged, and you had alight saber in one pocket and a whipin the other, which would you use?– Harrison Ford“”
  12. 12. Example #1 – The Raffle§  Tickets are numbered from 1 to 1,000,000§  Select 700,000 random winners§  No duplicates
  13. 13. The Raffle – Solution #1$winners  =  array_rand(    array_fill_keys(range(1,  1000000),  true),    700000  );  
  14. 14. The Raffle – Solution #1PROS§  Succinct§  Uses native functions§  Pretty fast§  O(n)  $winners  =  array_rand(array_fill_keys(range(1,  1000000),  true),  700000);  
  15. 15. The Raffle – Solution #1PROS§  Succinct§  Uses native functions§  Pretty fast§  O(n)  CONS§  Memory hog!§  Crashes on highernumbers§  Not very random dueto how array_rand()works$winners  =  array_rand(array_fill_keys(range(1,  1000000),  true),  700000);  
  16. 16. The Raffle – Solution #2$winners  =  array();  for  ($i  =  1;  $i  <=  700000;  $i++)  {        $n  =  mt_rand(1,  1000000);        if  (isset($winners[$n]))  {              $i-­‐-­‐;        }  else  {              $winners[$n]  =  true;        }  }  $winners  =  array_keys($winners);    Note:The "mt" inmt_rand()  stands forMersenne Twister.
  17. 17. The Raffle – Solution #2$winners  =  array();  for  ($i  =  1;  $i  <=  700000;  $i++)  {          $n  =  mt_rand(1,  1000000);          if  (isset($winners[$n]))  {                  $i-­‐-­‐;          }  else  {                  $winners[$n]  =  true;          }  }  $winners  =  array_keys($winners);  PROS§  Lower memory than #1§  Very good randomnessCONS§  Not really O(n)§  ~10x slower than #1§  Extra step to get results
  18. 18. The Raffle – Solution #3$winners  =  range(1,  1000000);  shuffle($winners);  $winners  =  array_slice($winners,  0,  700000);    PROS§  Fast§  O(n)§  Lower memorythan #1CONS§  More random than #1,but not as random as #2
  19. 19. CONS§  More random than #1,but not as random as #2PROS§  Fast§  O(n)§  Low memoryThe Raffle – Solution #3$winners  =  range(1,  1000000);  shuffle($winners);  $winners  =  array_slice($winners,  0,  700000);    How To Improve: Use a Fisher-Yates shufflealgorithm that is seeded with mt_rand().Thiswould increase the randomness withoutnegatively affecting performance.
  20. 20. The Raffle – Follow UpWhat if there were1,000,000,000 tickets?
  21. 21. The Raffle – Follow UpWhat if there were1,000,000,000 tickets?php  >  $r  =  range(1,  1000000000);  PHP  Fatal  error:    Allowed  memory  size  of  536870912  bytes  exhausted  
  22. 22. Example #2 – Odd Duck§  Input: an array of non-negative integers§  Integers in the array all existan even number of times§  Except for one of them…Find the "odd duck"
  23. 23. Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?
  24. 24. Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?§  Is an empty array valid? No.§  Is a single-element array valid? Yes.§  Is the array sorted? No.§  Can there be more than one instance of the"odd duck"? Yes.
  25. 25. Odd Duck – Before You Start§  Its OK to ask clarifying questions§  What kind of questions would you ask?§  Is an empty array valid? No.§  Is a single-element array valid? Yes.§  Is the array sorted? No.§  Can there be more than one instance of the"odd duck"? Yes.…  8  5  42  8  8  9  1  42  1  1  8  9  5  …  
  26. 26. Odd Duck – Exercise
  27. 27. Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)
  28. 28. Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)  2.  Use a 2nd array to count the occurrences of eachnumber, then look in that 2nd array for the odd one.
  29. 29. Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)  2.  Use a 2nd array to count the occurrences of eachnumber, then look in that 2nd array for the odd one.3.  Sort the array, and then look for the first occurrence ofa number that exists an odd number of times. (Bonuspoints: look in pairs)
  30. 30. Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)  2.  Use a 2nd array to count the occurrences of eachnumber, then look in that 2nd array for the odd one.3.  Sort the array, and then look for the first occurrence ofa number that exists an odd number of times. (Bonuspoints: look in pairs)4.  Use a 2nd array.When you encounter a number, add itto the 2nd array (as the key).When you encounter itagain, remove/unset it.
  31. 31. Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)  2.  Use a 2nd array to count the occurrences of eachnumber, then look in that 2nd array for the odd one.3.  Sort the array, and then look for the first occurrence ofa number that exists an odd number of times. (Bonuspoints: look in pairs)4.  Use a 2nd array.When you encounter a number, add itto the 2nd array (as the key).When you encounter itagain, remove/unset it.5.  XOR all of the array elements together. (Oh…)
  32. 32. Preparation and Tips
  33. 33. Preparing for the Questions§  Research your potential employer§  Be familiar with your own résumé§  Review the job description§  Practice technical interview questions§  Review data structures and algorithms§  Be prepared for behavioral questions
  34. 34. Behavioral Questions§  Questions related to past experiences§  "Give me an example of a time when…"§  "Tell me about something you did that…"§  "How do you handle a situation where…"§  Plan some good experiences to share§  Talk about "I", not "we", and be honest§  Be prepared to give details
  35. 35. Physical Preparations§  Be well-rested§  Arrive early§  Use the restroom before the interview§  Turn off your phone§  Assume business casual dress unless youare told otherwise
  36. 36. Interview Tips§  Dont Panic§  Ask Questions§  Dont Be Evasive§  ShowYour Skills§  Be Positive§  Learn Something
  37. 37. Any Questions?Presentation byJeremy Lindblom@jeremeamiaThanks!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×