How to pass a technical interview for a fresh Software Engineering role?

Today two guys asked me about how to pass an interview for a Software Engineering position (as I was offered SE jobs from Palantir and Google, and failed at tons of others). My answer was simple: think hard of a good solution and speak out loud what you are thinking, try to code without bugs, know how to test it and know what you are talking about, especially different data structures.

What I mean by “know” is that you should be able to explain the concept in a simple way and to answer most of the questions related to the concept.

To give an example, in an interview question, you can be asked: “Given a stream of sales: (item_id, number_of_items), how would you recommend a top N best-selling items”. Then be prepared to expect the conversation to be like:

Possible Question: how do you solve the problem?
Possible Answer: I use a max heap to remain the order of items with most sales. For any query, I return the top N items out of the heap. It takes O(NlgK) where K is the number of items in the heap.
Possible Question: How do you update the heap when a new tuple is received?
Possible Answer: For each tuple received from the stream, I update the counter of item_id in the heap, it takes O(lgK).
Possible Question: How do you know which node in the heap to update?
Possible Answer: In order to know which node to update in the heap, I use a hashmap item_id->node_id to keep track of where the item is located in the heap.
Possible Question: How does a hashmap work?
Possbile Answer: It keeps a list of linked list of (key, value). For lookup/modification, it uses the hash function of the key to locate the linked link, then iterates through the linked list to search for the key or add the new item to the linked list.
Possible Question: Implement a hashmap?
Possible Answer:
class HashMap(object):
def put(k, v):
….
def get(k):
….
Possible Question: How to remain O(1) for get/put?
Possible Answer: Keep the hash function of the key to be uniformly distributed.
Possible Question: What happens when the number of items is larger than the size of the list.
Possible Answer: I double the size of the list. Then, redistribute the items to the new list based on the hash(key) % list.size
Possible Question: How do you design the hash function?
Possible Answer: Do s.t like this: f(x)=(((31+x.t1)31+x.t2)31+x.t3) as suggested in Effective Java by Joshua Bloch.
Possible Question: Why do you choose 31?
Possible Answer: Because 31 is prime
Possible Question: Why do you choose a prime number?
Possible Answer: Assuming k=abf(x)=(((ab+t1)ab+t2)ab+t3)f(x)=(((abab+t1ab+t2)ab+t3)=(((ababab+t1abab+t2ab+t3)).    Then, (t1=a,t3=abab)  collides with (t1=1,t3=aabab). Hence, the less factors k has, the less collisions can happen.
Finally, interviewer will possibly say “cool”. Other possible questions include “how does the heap work?”, “implement a heap”, “what if I want top N-items in only last week”, “how to get top N from the heap in O(NlgN)”, “how does arraylist work?”, “implement LRU”,…

Make sure you know when interviewing for a grad level role:
  • Data structures: array, vector, trees, queue, stack, heap, hashmap, treemap.
  • Algorithms: sorts, recursive programming, dynamic programming, string matching, basic Graph algorithms (BFS, DFS, Dijkstra).
  • Concurrency: forking, deadlock, mutex, semaphore, Map/Combiner/Reduce.
  • Memory allocation and garbage collection.
  • Sql, database transaction and different isolation levels.
  • Bit operations: |, &, ^, <<, >>.
  • How disk works (seek, read, write).
  • Maintainability: different design patterns, git/svn, service-oriented architecture.
  • Scalability: load balancers, cache, proxy, index, shards, queue, replication.
  • Availability: share-nothing architecture (so SPOF), eventual consistency, RAIDs.
  • Consistency: vector clock, CAP theorem, FLP theorem, different levels of consistency, 2 phase, 3 phase commit, names of some concensus algorithms, consistent hashing, gossip protocols.
  • Basic concrete maths and probability.
  • Zen of Python (my bonus ;)).
Places to practice: Leetcode, Careercup, Glassdoor. Topcoder and Codeforces for more advanced algorithms.

Apart from technical performance, make sure you are polite, humble, and clear. Despite all of these effort, you still may fail for some unknown reasons. Not all interviewers are looking for the same thing or there will be other people who can do better than you. Just try your best and move on.

441 comments :

«Oldest   ‹Older   401 – 441 of 441
venusha said...

Really Very amazing blog with useful

information... Thanks for sharing such a nice

post..

Final Year Project Center

in Chennai
| Final Year Projects in

Velachery

srihariparu said...

Really amazing information you have shared with us. Thanks for sharing your wonderful post..
ISTQB Certification in Chennai | ISTQB Exams in Velachery

venusha said...

Really it was an awesome article...very interesting to read. You have provided an nice article....Thanks for sharing..
MBA Project Center in Chennai | MBA Projects in Velachery

alexsamcurren said...

Very useful post you are shared. I am getting lots of information from your site. Keep posting . Thank you...
JAVA Training in Chennai |
Python Training in Chennai|
AWS Training in Chennai|
Certified Ethical Hacking Training in Chennai|
Linux Training in Chennai |
Hardware and Networking Training in Chennai |
Dot Net Training in Chennai |
Web Designing Training Center in Chennai |

Gayathri said...

Really nice blog.. Thanks for posting this interesting article with us
AWS Certification in Chennai | AWS Exam Center in Velachery

srihariparu said...

Really nice blog.. Thanks for sharing..

GMAT Test Center in Chennai | GMAT Test Center in velachery

Gayathri said...

Nice Blog. Thank you for Sharing..
Python Training Institute in Chennai | python Training in Velachery

alexsamcurren said...

Interesting post. This is really helpful for me. I like it. Thanks for sharing.
JAVA Training in Chennai |
Python Training in Chennai|
AWS Training in Chennai|
Certified Ethical Hacking Training in Chennai|
Linux Training in Chennai |
Hardware and Networking Training in Chennai |
Dot Net Training in Chennai |
Web Designing Training Center in Chennai |

indhu said...

Nice Blog.. Thanks for sharing and keep updating..
GRE Test Center in Chennai | GRE Test Center in Velachery

alexsamcurren said...

Nice post... Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Advanced & Core JAVA Training in Chennai |
Python Training in Chennai|
AWS Training in Chennai|
Certified Ethical Hacking Training in Chennai|

alexsamcurren said...

Nice post... Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Advanced & Core JAVA Training in Chennai |
Python Training in Chennai|
AWS Training in Chennai|
Certified Ethical Hacking Training in Chennai|
Linux Training in Chennai |

srihariparu said...

Thank you so much for such valuable information sharing. It’s highly appreciated
Agile Scrum Master Training in Chennai | Agile Scrum Master Training in Velachery

Unknown said...

Wow!!!.. Superb blog with informative information's. Thanks for posting..
TOEFL Test Center in Chennai | TOEFL Test Center in Velachery

alexsamcurren said...

Impressive blog with lovely information. Really very useful article for us thanks for sharing such a wonderful blog...
Advanced & Core JAVA Training in Chennai |
Python Training in Chennai|
AWS Training in Chennai|
Certified Ethical Hacking Training in Velachery|
Linux Training in Chennai |
Hardware and Networking Training in Chennai |
Dot Net Training in Chennai |
Web Designing Training Center in Chennai |

alexsamcurren said...

Useful information and Please keep updating us..... Thanks for sharing...
Web Designing Training Center in Chennai & Velachery |
AWS Training in Chennai & Velachery|
Certified Ethical Hacking Training in Chennai & Velachery|
Linux Training in Chennai & Velachery |
Advanced & Core JAVA Training in Chennai & Velachery |
Python Training in Chennai & Velachery|
Hardware and Networking Training in Chennai & Velachery |
Dot Net Training in Chennai & Velachery |

alexsamcurren said...

Nice Post. Thanks for sharing. Keep on updating.
Certified Ethical Hacking Training in Chennai & Velachery|
Linux Training in Chennai & Velachery |
Advanced & Core JAVA Training in Chennai & Velachery |
Python Training in Chennai & Velachery|
Hardware and Networking Training in Chennai & Velachery |
Dot Net Training in Chennai & Velachery |
Web Designing Training Center in Chennai & Velachery |
AWS Training in Chennai & Velachery|

alexsamcurren said...

Great article, your blog was really unique... thanks for sharing…
Advanced & Core JAVA Training in Chennai & Velachery |
Python Training in Chennai & Velachery|
Hardware and Networking Training in Chennai & Velachery |
Dot Net Training in Chennai & Velachery |
Web Designing Training Center in Chennai & Velachery |
AWS Training in Chennai & Velachery|
Certified Ethical Hacking Training in Chennai & Velachery|
Linux Training in Chennai & Velachery |

alexsamcurren said...

Nice post. It was really effective. Thank you for sharing.
Certified Ethical Hacking Training in Velachery|
Linux Training in Velachery |
Advanced & Core JAVA Training in Velachery |
Python Training in Velachery|
Hardware and Networking Training in Velachery |
Dot Net Training in Velachery |
Web Designing Training Center in Velachery |
AWS Training in Velachery|

alexsamcurren said...

Thank you so much for sharing this worth able content with us. The Niche taken here will be useful for my future programs and I will surely implement them in my study.
Hardware and Networking Training in Chennai and Velachery |
Dot Net Training in Chennai and Velachery |
Web Designing Training Center in Chennai and Velachery |
Certified Ethical Hacking Training in Chennai and Velachery|
Linux Training in Chennai and Velachery |
Advanced & Core JAVA Training in Chennai and Velachery |
Python Training in Chennai and Velachery|

srihariparu said...

PMP Preparatory Training in Chennai | PMP Preparatory Training in Velachery

alexsamcurren said...

Thank you so much for sharing this worth able content with us. Keep blogging article like this.
Advanced & Core JAVA Training in Velachery |
Python Training in Velachery|
Hardware and Networking Training in Velachery |
Dot Net Training in Velachery |
Web Designing Training Center in Velachery |
Certified Ethical Hacking Training in Velachery|
Linux Training in Velachery |
AWS Training in Velachery|

srihariparu said...

Really an amazing blog with useful content.. Thanks for sharing.
CP SAT Selenium Certification in Chennai | CP SAT Selenium Certification in Velachery

alexsamcurren said...

Good Post! Thank you so much for sharing this Awesome post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
Linux Training in Chennai and Velachery |
AWS Training in Chennai and Velachery|
Advanced & Core JAVA Training in Chennai and Velachery |
Python Training in Chennai and Velachery|
Hardware and Networking Training in Chennai and Velachery |
Dot Net Training in Chennai and Velachery |
Web Designing Training Center in Chennai and Velachery |
Certified Ethical Hacking Training in Chennai and Velachery|

alexsamcurren said...

Interesting post. This is really helpful for me as a career Growth. Thanks for sharing……
Certified Ethical Hacking Training in Guindy|
Linux Training in Guindy |
AWS Training in Guindy|
Advanced & Core JAVA Training in Guindy |
Python Training in Guindy|
Hardware and Networking Training in Guindy |
Dot Net Training in Guindy |
Web Designing Training Center in Guindy |

Bama said...

The article is very informative...
AWS Training Institute in Chennai | CCNA Training Institute in Chennai | Linux Training Institute in Chennai

anjali said...

very useful blog shared with us ...
AWS Training Institute in Chennai | CCNA Training Institute in Chennai | Linux Training Institute in Chennai

srihariparu said...

Wow!!... Superb blog with wonderful information..
PCB Design Training Institute in Chennai | PCB Design Training Center in Velachery

anjali said...

very excellent blog . . .
AWS Training Institute in Chennai | CCNA Training Institute in Chennai | Linux Training Institute in Chennai | CCNA Training Institute in Velachery

srihariparu said...

Really an amazing post with useful information. keep updating..
GMAT Test Center in

Chennai
| GMAT

Test Center in Velachery

anjali said...

excellent blog with informative content...
Selenium Training Institute in Chennai | Selenium Training Institute in Chennai | Selenium Training Institute in Medavakkam | Selenium Training Institute in Tharamani

Reshma said...


Awesome blog. Thanks for sharing such a worthy information....
Java Training in Bangalore
Java Classes in Pune

Pavithra Devi said...

Mindblowing blog very useful thanks
IELTS Coaching in Porur
IELTS Coaching in Chennai

fagenyanta said...

Best Slot Machine Games Online for Android - JDH Hub
Play the งานออนไลน์ best slots 천안 출장마사지 at JSlot 고양 출장마사지 for free online without registration. JSlot offers an instant play, a sign up bonus for 광주 출장마사지 an instant play. Rating: 5 · ‎2 용인 출장안마 votes

cadeasy said...

Nice reading, I love your content. This is really a fantastic and informative post. Keep it up and if you are looking for http://www.cadeasy.in/ then visit cadeasy.

JENENI said...

Alltechzsolutions provides 100% real-time, practical and placement focused CCNA training in Chennai. Our CCNA course concentrates from basic level training to advanced level training. Our CCNA® training in completely focused to get placement in MNC in Chennai and certification on CCNA after completion of our course. Our team of CCNA trainers are CCNA certified professionals with more real-time experience in live projects. Our CCNA® Course syllabus is enough for anyone who wants to get CCNA certification which meets industry expectations. In our course plan, you will learn Networking concepts,OSI – Model,TCP/IP Model & Ipv4 Addressing, with practical exercises and live examples.Alltechzsolutions offer both off line and online courses.

JENENI said...

Amazing Blog comment I am really happy watching this website

Agile Scrum Master training in chennai

DLK Technologies said...

Thank you so much for sharing this information. Do visit cse projects in chennai

Inga Cotter said...

Thanks for sharing Blog.. Rug Online Australia

Inga Cotter said...

Thanks for Shairng Blog.. Rug Online Australia

Custom Logo Design Services said...

Thanks for sharing Blog.. custom logo design services

Custom Logo Design Services said...

I Love Blog and all the information. Thanks for sharing.. unlimited graphic design services

«Oldest ‹Older   401 – 441 of 441   Newer› Newest»