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.

262 comments :

«Oldest   ‹Older   201 – 262 of 262
harry said...

Nice post... Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...
Machine Learning Training Institute in Chennai |Machine Learning Training Institute in Velachery
|Machine Learning Training Institute in Guindy

Aravind1 said...

This Blog is very Nice and very useful to us...


Best JAVA Institute in Chennai | JAVA Training in velachery | Best JAVA Training in Keelkattalai | Best JAVA Training in Perungudi

srihariparu said...

I really enjoyed this article. I need more information to learn so kindly update it.
VLSI Project Center in Chennai | VLSI Projects Center in Velachery | VLSI Projects in Nanganallur

sinu said...

This Blog is very Nice and very useful to us...


Best MATLAB Institute in Chennai | MATLAB Training in velachery | Best MATLAB Training in Keelkattalai | Best MATLAB Training in Perungudi

srihariparu said...

Nice and interesting article to read..... keep updating
MBA Project Center in Chennai | MBA Project Center in Velachery | MBA Projects in Velachery | MBA Projects in Taramani

srihariparu said...

Nice and interesting article to read..... keep updating
MBA Project Center in Chennai | MBA Project Center in Velachery | MBA Projects in Velachery | MBA Projects in Taramani

deepti said...

Awesome Blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog.
Java Project Center in Chennai | Java Projects Center in Velachery | Java Projects in Perungudi

srihariparu said...

Really Very happy to see this blog. thanks for sharing such a amazing blog...
Image Processing Project Center in Chennai | Image Processing Projects in Velachery | Image Processing Projects in Taramani

riya said...

This Blog is very Nice and very useful to us...


Tally ERP9 Course in Chennai | Tally ERP9 Course in velachery | Tally Training in Keelkattalai | Tally Training in Perungudi

srihariparu said...

Very interesting, good job and thanks for sharing such blog. It is very interesting to read. Its pretty good and well noted.
Cloud Computing Project Center in Chennai | Cloud Computing Projects in Velachery

deepti said...

Thanks for giving nice information and informative blog...It's really an amazing post..keep updating..
MBA Project Center in Chennai | MBA Projects in Velachery | MBA Projects in Perungudi | MBA Finance Projects in Velachery | MBA HR Projects in Velachery | MBA Marketing Projects in Velachery

srihariparu said...

Excellent Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge...
Final Year Projects for BCA in Chennai | Final Year Projects for BCA in Velachery | Final Year Projects for MCA in Velachery | Final year Projects in Velachery

deepti said...

Very nice information to updating..Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
Electrical Project Center in Chennai | Electrical projects in Velachery | Electrical Projects in St.thomas Mount

srihariparu said...

Really nice and good post. Thank you for sharing amazing information.
PHP Project Center in Chennai | PHP Projects in Velachery | PHP Project Center in Nanganallur | PHP Projects in Guindy | PHP projects in Taramani

deepti said...

Very interesting, good job and thanks for sharing such blog. It is very interesting to read. Its pretty good and well noted. All your points are very useful.
Cloud Computing Project Center in Chennai | Cloud Computing Projects in Velachery | Cloud Computing Projects in Chrompet

deepti said...

I read this article. I think You put a lot of effort to create this article. I appreciate your work.
Embedded System Training Institute in Chennai | Embedded Training Center in Velachery | Embedded Training in Guindy

Jack sparrow said...



The article provides good information and here i want to share some information about ibm business process manager training and Linux training videos

Priyanka said...

Attend The Digital Marketing Courses in Bangalore From ExcelR. Practical Digital Marketing Courses in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Digital Marketing Courses in Bangalore.
Digital Marketing Courses in Bangalore

Rakshitha said...

Marvellous Post...
SAP Training in Chennai
Java Training in Chennai
Selenium Training in Chennai
QTP Training in Chennai
Hardware and Networking Training in Chennai
CCNA Training in Chennai
MCITP Training in Chennai
Oracle Training in Chennai
PHP Training in Chennai
AWS Training in Chennai

Rakshitha said...

Wonderful Post...
SAP Training in Chennai
Java Training in Chennai
Software Testing Training in Chennai
Hardware and Networking Training in Chennai
Informatica Training in Chennai
CCNA Training in Chennai
Oracle Training in Chennai
Cloud Computing Training in Chennai
Azure Training in Chennai
AWS Training in Chennai

Rakshitha said...

Excellent Stuff..With lots of useful Information...
SAP Training in Chennai
Java Training in Chennai
QTP Training in Chennai
Hardware and Networking Training in Chennai
SAP ABAP Training in Chennai
SAP FICO Training in Chennai
SAP SD Training in Chennai
SAP MM Training in Chennai
SAP PP Training in Chennai
AWS Training in Chennai

datasciencecourse said...

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!

data science course

Mithun said...

Informative post on cloud technology AWS training in chennai. Thanks cloud is now implemented in SAP HANA module too for SAP Training in Chennai.

varsha said...

Really very informative and creative contents. These concept is a good way to enhance the knowledge.
AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

vivekvedha said...

"Thanks for sharing this article

Digital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
"

Rashika said...

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery


Village Talkies said...

Best Corporate Video Production Company in Bangalore and top Explainer Video Company in Bangalore , 3d, 2d Animation Video Makers in Chennai.
Great article, Charles. Thanks for it.

deiva said...

generally i encourage innovative ideas and you add new things in your all articles. I like the way of your approach and keep it up.
Digital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery


Tanika Co Valda said...

Great Article
Cloud Computing Projects


Networking Projects

Final Year Projects for CSE


JavaScript Training in Chennai

JavaScript Training in Chennai

The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

srihariparu said...

Thanks for sharing this information, it helped me a lot in finding valuable resources for my career
Java Training Institute in Chennai | Java Training Center in Velachery | java Training in Chennai

srihariparu said...

Thanks for sharing this information, it helped me a lot in finding valuable resources for my career
Java Training Institute in Chennai | Java Training Center in Velachery | java Training in Chennai

Revathi said...

I appreciate that you produced this wonderful article to help us get more knowledge about this topic.Thanks lot!!

Android Training in Chennai | Certification | Mobile App Development Training Online | Android Training in Bangalore | Certification | Mobile App Development Training Online | Android Training in Hyderabad | Certification | Mobile App Development Training Online | Android Training in Coimbatore | Certification | Mobile App Development Training Online | Android Training in Online | Certification | Mobile App Development Training Online

Radley Co Tad said...

Great Article
big data projects for cse final year students


Java Training in Chennai



Final Year Projects for CSE



Java Training in Chennai

Rashika said...

This is an awesome post.
Digital Marketing Training in Chennai | Certification | SEO Training Course | Digital Marketing Training in Bangalore | Certification | SEO Training Course | Digital Marketing Training in Hyderabad | Certification | SEO Training Course | Digital Marketing Training in Coimbatore | Certification | SEO Training Course | Digital Marketing Online Training | Certification | SEO Online Training Course


surya said...

Great post!! Reading your blog left me with some useful info and this was an awesome blog.
Angular JS Training in Chennai | Certification | Online Training Course | Angular JS Training in Bangalore | Certification | Online Training Course | Angular JS Training in Hyderabad | Certification | Online Training Course | Angular JS Training in Coimbatore | Certification | Online Training Course | Angular JS Training | Certification | Angular JS Online Training Course

srihariparu said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
No.1 MatLab Training Institute in Chennai | MatLab Training Center in Velachery | MatLab Training in Velachery

deepti said...

I have read your post, its very attractive and impressive. I like it your blog.
C and C++ Training Institute in Chennai | C & C++ Training Center in Chennai | Online Training in Velachery

srihariparu said...

Great article Glad to find your blog. Thanks for sharing.
PCB Design Training Institute in Chennai | PCB Training Center in Velachery | PCB Design Course in Velachery

giai ma giac mo lo de said...


trung tâm tư vấn du học canada vnsava



công ty tư vấn du học canada vnsava
trung tâm tư vấn du học canada vnsava uy tín
công ty tư vấn du học canada vnsava uy tín
trung tâm tư vấn du học canada vnsava tại tphcm
công ty tư vấn du học canada vnsava tại tphcm
điều kiện du học canada vnsava
chi phí du học canada vnsava
#vnsava
@vnsava

srihariparu said...

It is very awesome and wonderful to visit your site.Thanks for sharing this information,this is helpful to me a lot...
Java Training Institute in Chennai | java Training Center in Velachery | Java Training in Velachery | Online Training Institute in Velachery

srihariparu said...

Awesome Blog with Smart Content, Thanks for sharing such a nice blog..
Embedded System Training in Chennai | Embedded Training Center in Velachery | Online Training Institute in Velachery

N.S. Academy said...

Share great information about your blog , Blog really helpful for us . We read your blog , share most useful information in blog . Thanks for share your blog here .
Digital Marketing Online Training

srihariparu said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is helpful to me a lot...
PCB Training Institute in Chennai | Online PCB Courses in Velachery | PCB Training in Velachery

praveen said...

Wonderful blog with great piece of information. Regards to your effort. Keep sharing more such blogs.Looking forward to learn more from you.
oracle training in chennai

oracle training in porur

oracle dba training in chennai

oracle dba training in porur

ccna training in chennai

ccna training in porur

seo training in chennai

seo training in porur

jeni said...

Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites!

web designing training in chennai

web designing training in velachery

digital marketing training in chennai

digital marketing training in velachery

rpa training in chennai

rpa training in velachery

tally training in chennai

tally training in velachery

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand.Thanks for this useful information.......
PCB Design Training in Chennai | PCB Training Institute in Velachery | PCB Courses in Velachery | Online Training Institute in Velachery

srihariparu said...

Your Post is really wonderful and amazing content.Thanks for sharing such a useful blog and really good...
Java Training Institute in Chennai | Java Training Center in Velachery | Online Training Institute in Velachery

deepti said...

This post is really nice and informative. The explanation given is really comprehensive and informative..
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Training Courses in Chennai | CCNA Training in Velachery | CCNA Online Training in Velachery

deepti said...

Thanks for giving nice information from your blog...It's really an amazing post..
AWS Certification Training in Chennai | AWS Training Center in Velachery | AWS Online Training in Velachery | AWS Training Institute in Velachery

srihariparu said...

Thanks for giving nice information from your blog...It's really an amazing post...
Tally Training Institute in Chennai | Tally Training Center in Velachery | Tally Training with GST Training in Velachery | Online Training Center in Velachery

deepti said...

Amazing Blog with Smart Content, Thanks for sharing such a nice blog..
Embedded Training Center in Chennai | Embedded System Training in Velachery | Embedded System Courses in Velachery

srihariparu said...

Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article.
C and C++ Training Institute in Chennai | C and C++ Training Center in Velachery | C & C++ Training in Velachery | Online Training in Velachery

srihariparu said...

It is awesome and nice to visit your site. Thanks for sharing this information, this is helpful to me a lot...
AWS Certification Training Center in Chennai | AWS Training Institute in Velachery | AWS Training in Velachery | AWS Online Training in Velachery

srihariparu said...

I have read your blog, its really very attractive and impressive. I like it your post. Thanks for sharing such a wonderful blog with us...
PCB Training Institute in Chennai | PCB Training Center in Velachery | PCB Online Courses in Velachery | Online Training Center in Velachery

deepti said...

Very informative blog. Thanks a lot for sharing this wonderful blog. keep updating such a excellent post with us.
Embedded System Training Center in Chennai | Embedded Training Institute in Velachery | Embedded Online Training in Velachery | Enbedded Courses in Velachery

srihariparu said...

I have read your blog. Your information is really useful for beginner. information provided here are unique and easy to understand. Thanks for this useful information. This is a great inspiring article. I am pretty much pleased with your good work.
AWS Training Institute in Chennai | AWS Training Center in Velachery | AWS Certification Training in Velachery

Mithra said...

Nice Information my sincere thanks for sharing this post Please Continue to share this kind of post
Linux Training Institute in Chennai | Linux Training Center in Velachery | Online Linux Training in Velachery | Linux Courses in Velachery

deepti said...

Excellent post... Thank you for sharing such a informative and information blog with us.keep updating such a wonderful post..
MicorSoft Azure Training Institute in Chennai | Azure Training Center in Chennai | Azure Certification Training in velachery | Online Azure training in Velachery

srihariparu said...

It is amazing and wonderful to visit your site. Thanks for sharing this information, this is helpful to me a lot...
CCNA Training Institute in Chennai | CCNA Training Center in Velachery | CCNA Courses in Velachery | CCNA Online Training in Velachery

Mithra said...

Your blog is really amazing, its very informative article and useful for everyone.. Thanks for
sharing such a nice post..
Java Training Institute in Chennai | Java Training Center in Velachery | Java Courses in Velachery | Java online Training in Velachery

Sathish said...

Excellent information with unique content and it is very useful to know about the information based on blogs...
ISTQB Certification Course in Chennai | ISTQB Certification Course in Tharamani

srihariparu said...

Amazing Post.. Thanks for sharing such a informative article.
PMP Certifications in Chennai | PMP Certifications in Velachery

«Oldest ‹Older   201 – 262 of 262   Newer› Newest»