Presentation is loading. Please wait.

Presentation is loading. Please wait.

CRACKING THE CODING INTERVIEW Nitish Upreti. Nitish

Similar presentations


Presentation on theme: "CRACKING THE CODING INTERVIEW Nitish Upreti. Nitish"— Presentation transcript:

1 CRACKING THE CODING INTERVIEW Nitish Upreti

2 Nitish Upreti @nitish http://niti.sh/ http://niti.sh/

3 Feedback Please ! ( I am a Data Junkie… ) www.meet.ps www.meet.ps

4 Why this Talk? Why should you care ?

5 For the love of Computer Science …

6 Building Amazing Products

7 Working with the best of People…

8 Have an Impact !

9 Head start in Building your career …

10 Money & Free Food ?

11 Start Your own Company ?

12 Working for the Top Technology Companies. (Computer Science-Engineering majors are most pampered and well paid…)

13 Easy : Just clear the coding interview ?

14

15 Or Not ?

16 Some of us are scared ! How does the interview work? What do they judge me on? Do’s / Don’ts

17 Are these interviews fair? Can you judge someone in few hours or a day?

18 Think of Interviews as acing SATs / GREs … ( Whether they are any good is debatable!)

19 GAME PLAN : 1. Study all my subjects well. 2. Finish all Assignments/Projects. 3. Get an awesome GPA.

20 There is more to it …

21 Would you practice for a Sprint by running marathons each day?

22 Preparations Matter! “Sweat now so you don't bleed later.” Take Away….

23 Lets get cracking!

24 Before the Interview…

25 How to get interviews at the first place? Career fairs. Referrals from friends and seniors. (Almost guarantees an interview) Be active on LinkedIn. Visit Hackathons. Start competing on HackerRank / TopCoder. Email cto_first_name / ceo_first_name @startup

26 Quick Preliminaries Perfect your resume (No spelling mistakes / grammar errors) ACM provides help! Prepare Behavioral Questions Judging You On : What you learned? Most Challenging Problems ? Most Interesting Problem ? Hardest Bug ? Enjoyed Most ? Conflict with Teammates ?

27 So I got the call

28 How does the Interview Process work ? ( At least for the Popular Ones …. )

29 Interview Process Starts with an Email Conversation. Scheduling day/time for Phone or Campus screening Internships : Usually 2 telephonic rounds. Full time : 5-7 interviews PSU Microsoft experience is an exception when it comes to interviews. (Why?) You are notified in a couple of weeks. Details are in the Book!

30 How should I prepare ?

31 White Board Coding…. (Without the cozy compiler : Marathon and Sprint metaphor again!)

32

33 What should I prepare?

34 Almost Comprehensive List … Elementary DS : – Arrays, Stacks & Queues – Linked Lists – Trees ( Binary Trees, Binary Search Trees) – Hash Tables Asymptotic Analysis Sorting with their Runtimes. Recursion ! String Problems Good to know : TRIE and Priority Queue ( BinaryHeap)

35 Advanced Divide and Conquer Algorithms. Greedy Algorithms Dynamic Programming Graph Algorithms Some Design Problems

36 During the Interview …

37 Key things to keep in mind All questions are language independent. Start Talking ( Interviewers nudge you towards the right direction ) Think before you start / Don’t rush. Propose a variety of solutions idea before settling on coding a particular idea. Sound Enthusiastic ! Ask questions in the end : How do you work? What do you work on?

38 Make Or Break it ! Think about Corner cases. Test your code once your done. Be Space / Time Efficient. ( Distinguishes a Good Vs Bad Interview)

39 Lets dissect a real interview question !

40 Given a set of integers, is there a subset of size k whose sum is zero? Array = { 3, 9, 1, 6, 0, 2 } Sum = 8

41 I am STUMPED !

42 Let us start talking ….

43 Brute Force Anyone ? Find all the possible sums and if the given sum is one of them, we have a solution! Brute Force could be a good start. Don’t code it yet !

44 Runtime Analysis ? O ( N 2 )

45 Can we do better? At Google’s scale there will be Billion Numbers !

46 Sorting + Binary Search ? O (N log N) + O (log N)

47 Can we do Even Better?

48 How about a Hash Table Solution? First Passes : Create a Map (HashMap) Array = { 3, 9, 1, 6, 0, 2 } Hash = { (3,T) (9,T) (1,T) (6,T) (0,T)(2,T) } Scan through the keys & look for remainder.

49 Corner Case : Duplicate Elements ! Array = { 3, 9, 1, 6, 0, 4 } Hash = { (3,T) (9,T) (1,T) (6,T) (0,T)(4,T) } Solution : Store Count !

50 Complexity ? Time : O ( N ) Space : O ( N )

51 MUST READ Books …

52

53

54 Before I Finish …

55 GSoC 2014 Is On!

56 Feedback / Questions ?

57


Download ppt "CRACKING THE CODING INTERVIEW Nitish Upreti. Nitish"

Similar presentations


Ads by Google