Surviving and Thriving in Technical Interviews
Upcoming SlideShare
Loading in...5
×
 

Surviving and Thriving in Technical Interviews

on

  • 276 views

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 ...

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.

Statistics

Views

Total Views
276
Views on SlideShare
267
Embed Views
9

Actions

Likes
0
Downloads
4
Comments
0

1 Embed 9

http://speakerrate.com 9

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

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

    Surviving and Thriving in Technical Interviews Surviving and Thriving in Technical Interviews Presentation Transcript

    • 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 improvements§  Handle changes or constraintsAbility to Solve Problems
    • §  Domain-specific Knowledge§  Data Structures§  Algorithms§  Design Patterns§  Dealing with Large Data SetsTechnical Skills
    • §  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
    • §  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!)  
    • §  The amount of memory cells analgorithm needs.§  Often have to evaluatetradeoffs betweenspace and timecomplexity§  Doing things "in-place" or notSpace Complexity
    • §  Communication§  Teamwork§  Leadership§  Confidence§  ResponsibilitySee Amazon Leadership Principles - http://amzn.to/Qb6JB6Soft Skills
    • Technical InterviewQuestion Examples
    • 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“”
    • 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_fill_keys(range(1,  1000000),  true),  700000);  
    • 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);  
    • 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.
    • 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
    • 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
    • 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.
    • 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  error:    Allowed  memory  size  of  536870912  bytes  exhausted  
    • 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"
    • 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 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.
    • 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  …  
    • Odd Duck – Exercise
    • Odd Duck – Solutions1.  For each number in the array, count the occurrences ofthat number and check if its odd. Bad choice: O(n2)
    • 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.
    • 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)
    • 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.
    • 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…)
    • Preparation and Tips
    • 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
    • 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
    • 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
    • Interview Tips§  Dont Panic§  Ask Questions§  Dont Be Evasive§  ShowYour Skills§  Be Positive§  Learn Something
    • Any Questions?Presentation byJeremy Lindblom@jeremeamiaThanks!