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.

69 comments :

Amirtha rao said...

Nice post! I always preferred blogger to get ideas, because its provides more information over the books & here I gathered more precious skill from the professional, thanks for taking your to discussing this topic.
Regards,
Best JAVA Training in Chennai|JAVA Training

Priya R said...

Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
cloud computing training in chennai | cloud computing courses in chennai

vensika said...

Great blog with useful information. Thanks for sharing such a nice blog. Kindly keep updating like this article. Software Testing Training in Chennai | Selenium Training in Chennai

Deshma Teja said...

Good post. I had read your blog, it's very nice and informative content.. Web Designing Training Institute in Chennai | Web Designing Training Institute in Velachery.

Siva Seo said...

Good post..Keep Sharing.! I'm working in brave technologies private limited.

Mehgna Sharma said...

Nice post Thanks for the Sharing this information Big Data Hadoop Training | PHP Training in Noida

prabash said...

Awesome blog., Java Training in Chennai | Dot Net Training in Chennai

rupesh rupi said...

Wonderful blog. I will gained more information from your post..Selenium Training Institute in Chennai | Selenium Training Institute in Velachery.

praveen said...

Nice Blog..Thanks for sharing..


Linux Training in Chennai | No.1 Linux Training Institute in Chennai | Red Hat Linux Training in Chennai | Online Linux Training in Chennai

revathi said...

Excellent post. I have read your blog it's very interesting and informative.Java Training Institute in Chennai | Java Training Institute in Velachery.

Webtrackker Sohit said...

Sas Training Institute in Noida-Webtrackker is the best sas training institute in noida. SAS has taken the lead role for a long time, where most companies have standard software. While you have this certification under your belt, give big rewards to the IT industry, it can also serve as an important payer on the business side of the economy. SAS can read data files created by other statistical packages. Therefore, for experienced users of these statistical packages, SAS does not threaten to create data files created by these packages in a SAS file format.
Sap Training Institute in Noida
PHP Training Institute in Noida
Hadoop Training Institute in Noida
Oracle Training Institute in Noida
Linux Training Institute in Noida
Dot net Training Institute in Noida
Salesforce training institute in noida
Java training institute in noida

ASO Services said...

Good post and I like it very much. By the way, anybody try this increase app downloads? I do not how to use.

dushyant sharma said...

Webtrackker Indirapuram offers an inclusive software testing training in Indirapuram. The extensive practical training provided by the Software Testing training institute in Indirapuram, equips live projects and simulations. Such a detailed course in Software Testing has helped our students to obtain work in several multinationals. The Webtrackker trainers are subject to specialized corporate professionals who offer an in-depth study in the Software Testing course in Indirapuram.
software testing institute in Indirapuram

dushyant sharma said...

Webtrackker Indirapuram offers an inclusive software testing training in Indirapuram. The extensive practical training provided by the Software Testing training institute in Indirapuram, equips live projects and simulations. Such a detailed course in Software Testing has helped our students to obtain work in several multinationals. The Webtrackker trainers are subject to specialized corporate professionals who offer an in-depth study in the Software Testing course in Indirapuram.
software testing institute in Indirapuram

aashutosh webtrackker said...


Aws online training in india
Aws online training in india – Webtrackker is the best AWS stands for Amazon Web Services, the name given to the cloud computing facilities of the Amazon group. It has a comprehensive training program based on solutions that should be known to those who aspire to develop their skills in cloud computing. Applicants can receive a high quality AWS training experience from experts from reputable training institutes. Many different skills are taught to applicants in AWS. Candidates are exposed to the main functionalities of the main Webtrackker is the best AWS services in India, key concepts, applications, security and architectural patterns. Industry experts allow candidates to work on best practices in AWS. The knowledge of the concepts in a practical environment helps the aspirants to use practical exercises during the training.
Aws online training in india

aashutosh webtrackker said...

Webtrackker is the best Salesforce online training in india, Do not assume that all sales employees have understood how the training should be applied. Sales training is largely generic. There may be a gap between knowing how to apply a principle. You want to make sure you close that gap. If necessary, take a new language. If the training requires a new language or terms that you have not used before, adjust the new terms as part of your sales vocabulary. This will help strengthen the training. Webtrackker is the best training in India Do not conduct sales training that is not in line with your sales philosophy. Before investing in a sales training program, make sure the curriculum matches your sales philosophy. For example, if you use a strategic sales process, do not send your salespeople to training that focuses primarily on tactics and not strategies. Keep the goals of the sales team members that you want to achieve with the salesforce training before the salesforce training begins. Knowing what you want to stop training before you start training is very valuable.

Salesforce online training in india

Sunil Dubey said...

SAS training institute in noida
php training institute in noida
linux training institute in noida
cloud Computing Training in Noida
hadoop training institute in noida

Adlina Jessi said...

Thank you for taking the time to provide us with your valuable information.Android Training Institute in Chennai | IOS Training Institute in Chennai | Core Java Training Institute in Chennai

Sunil Dubey said...

SAS training institute in noida
php training institute in noida
linux training institute in noida
cloud Computing Training in Noida
hadoop training institute in noida
Python R Training Institute in Noida

kri pav said...

I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly. 
No.1 Software Testing Training Institute in Chennai | Best Selenium Training Institute in Chennai | ISTQB Certification Center in Velachery

Sunil Dubey said...

SAS training institute in noida
php training institute in noida
linux training institute in noida
cloud Computing Training in Noida
hadoop training institute in noida
Python R Training Institute in Noida

Sunil Dubey said...

SAS training institute in noida
php training institute in noida
linux training institute in noida
cloud Computing Training in Noida
hadoop training institute in noida
Python R Training Institute in Noida

aashutoshtiwari said...

Oracle DBA online training in India

dushyant sharma said...

NEW YEAR OFFERS 2018

Flipkart New Year Offers on Mobile Phones


Ebay New Year Offers On Mobile Phones

Inigo joseph said...

Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
software testing training in chennai

dushyant sharma said...

SEO Company In Cape Town

SEO company in Durban

SEO Company in india
SEO company in Johannesburg

dushyant sharma said...

Seo company in zimbabwe

Seo company in washington

Seo company in wakefield

Seo company in virginia

Seo company in usa

deepti said...

Wow..Nice post to updating...I have learn so many things from your blog...Diploma Projects Center in Chennai | Diploma Projects Center in Velachery

srihariparu said...

Great and nice one... thanks for sharing your information... keep updating and rocks...
Best Mat Lab Project Center in Chennai | IEEE Mat Lab Projects in Velachery

Sirkus System IT Services Pvt. Ltd. said...

Sirkus System Bangalore Reviews- Sirkus System IT Services Pvt Ltd a logo name specialized in product improvement & answers for mobile environment and other platforms Sirkus device Bangalore critiques- Quality development, dedicated work approach and professional attitude are some of the traits which outline Sirkus Systems IT Services Pvt Ltd.

Sirkus system
sirkus system
Sirkus Systems
sirkus system review
Sirkus System
Sirkus System Reviews
Sirkus System
Sirkus System Review





















Riya karakoti said...

Java training in indirapuram- There are multiple structures and streams for developing a product or utility. When we talk of technology and programming languages, Java is the maximum desired platform. It is used to expand a whole lot of programs for the systems and embedded devices like cellular telephones, drugs, laptops, and many others.

Java training in indirapuram

Hadoop training in indirapuram

sas training in indirapuram

sap training in indirapuram

linux training in indirapuram

sap fico training in indirapuram

web design training in indirapuram

php training in indirapuram

JamesWilliam said...


Interesting post! This is really helpful for me. I like it! Thanks for sharing!
Mobile application developers in Chennai | PHP developers Chennai

Riya karakoti said...

Best Hadoop Training Institutes In Noida

best sas training institutes in noida

best sap training institutes in noida

best linux training institutes in noida

best salesforce training institutes in noida

best software testing training institutes in noida

Riya karakoti said...

best python training institutes in noida

best oracle training institutes in noida

best android training institutes in noida

best php training institutes in noida

best web design training institutes in noida

best java training institutes in noida

Riya karakoti said...

best sap mm training institutes in noida

best sap sd training institutes in noida

best sap hr training institutes in noida

best tableau training institutes in noida

best automation anywhere training institutes in noida

best rpa training institutes in noida

best blue prism training institutes in noida

best digital marketing training institutes in noida

best angularjs 5 training institutes in noida

best net training institutes in noida

Vinoth Kumar said...

PLC Training in Chennai | PLC Training Institute in Chennai | PLC Training Center in Chennai | PLC SCADA Training in Chennai | PLC SCADA DCS Training in Chennai | Best PLC Training in Chennai | Best PLC Training Institute in Chennai | PLC Training Centre in Chennai | Automation Training in Chennai | Automation Training Institute in Chennai

aashutosh webtrackker said...

Vermeer Vermeer- prints are covered in complete within this text, in which the career of famous Dutch artist Johannes Vermeer is also discussed in complete.Vermeer's profession became vast and big, but it's miles typically regular that his best art work protected the likes of Girl with a Pearl Earring,

srihariparu said...

Your blog is informative and impressive..Thanks for sharing..
Robotics Project Center in Chennai | Best Robotics Projects in Chennai | IEEE Robotics Project Center in Chennai | No.1 Robotics Project Center in Velachery

dharu dhari said...

Thanks For Your valuable posting, it was very informative..Mat Lab Projects Center in Chennai | Mat Lab Projects Center in Velachery

roja sun said...

Great article..Thanks for sharing your informative and impressive post..
No.1 Electrical Project Center in Chennai | Electrical Project Center in Velachery

sherin angel said...

Nice Blog with useful concept. I feel happy to see your informative blog, Thanks for sharing such a nice blog.
Final Year Project Center in Chennai | Final Year Project Center in Velachery

Rajesh said...


Thanks for one marvelous posting! I enjoyed reading it;Great post.The information was very useful.Keep the good work goin on!!
Hadoop training in chennai | Mainframe training in chennai | SAP SD training in chennai

swetha A said...

Nice blog. thank You for sharing such a nice post..I really enjoyed your post from start to ending..please keep on updating..
Best AWS Training Institute in Chennai | Best AWS Training Institute in Velachery

sherin angel said...

Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
MCA Project Center in Chennai | MCA Project Center in Velachery

shabaz r said...

Hi, am a big follower of your blog. I am really happy to found such a helpful and fascinating post that is written in well manner.

mobile website builder

ranasing rajkumar said...

I read our full content was really amazing,then the this more important in my part of life.
The given information very impressed for me really so nice content.


white label website builder

autocad institute said...

AutocAD
Best Autocad training in delhi
AutoCAD Summer Training in Uttam Nager
AutoCAD Summer Training in Delhi

raagav rase said...

Awesome post. Really you have shared very informative concept... Thank you for sharing. Keep on updating... Tata Sky | Tata Sky New Connection | Tata Sky DTH New Connection

Adlina Jessi said...

Interesting blog. This is really helpful for me. Thanks for sharing such a great blog. Graphic Designing Summer Camp in Velachery | Graphic Designing Summer Classes in Chennai | Graphic Designing Summer courses in Taramani

cyber news said...

thanks for sharing the information.
Indian Cyber Army’s most awaited internship is live now. Summer Internship 2018 on “ Ethical hacking” and book your seats before it runs out.Candidates have to get themselves registered to be a part of this Internship program. Here internship will give you on-the-job experience, help you learn whether you and Cyber security industry are a good match and can provide you with valuable connections and references. Here interns are usually exposed to a wide variety of tasks and responsibilities which allows the intern to showcase their strengths by working on projects for various managers that work on different parts of Indian Cyber Army. Becoming a high performing intern is a fantastic way to improve your employment prospects. This internship can be a great way to get your foot in the door of success with a prestigious or desirable Organization.As career in ethical hacking is most in demand.

Orange Techno Mind said...

Thanks for sharing
android training in chennai
aws training in chennai
dotnet training in chennai
informatica training in chennai
hadoop training in chennai
hadoop training in chennai
devops training in chennai
php training in chennai
salesforce developer training in chennai

Shekhar Kukkar said...

Thanks for the information.It is really nice .Information security is the set of processes that maintain the confidentiality, integrity and availability of business data in its various forms.In this age of Technology advancement, computer and information technology have not only brought convenience to citizens in modern life but also for policemen & various Government officials of the nation to fight cybercrime through various modus operandi. Indian Cyber Army has been dedicated in fighting cyber crime, striving to maintain law and order in cyberspace so as to ensure that everyone remains digitally safe.Read more:- Information Security

akmin karthick said...

This article has been very useful we are providing website builder for our customers its easy to use and very simple mobile compatible website builder at very low price please visit our website. Visit website

cyber news said...

thanks for sharing the more valuable information.
Indian Cyber Army credibility in Ethical hacking training & Cybercrime investigation training is acknowledged across nation as we offer hands on practical knowledge and full assistance with basic as well as advanced level ethical hacking & cybercrime investigation courses. The training is conducted by subject specialist corporate professionals with wide experience in managing real-time ethical hacking/ cyber security projects. Indian Cyber Army implements a blend of academic learning and practical sessions to give the candidate optimum exposure.Ethical hacking training ,
Ethical hacking course

Deepika Analy said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.

IBM BPM Online Training in Chennai
IBM BPM Online Training

Unknown said...

Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
java training in chennai
java course in chennai

ajay said...

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

aashutosh webtrackker said...

Salesforce Training Institute in Noida

Salesforce Training in noida

Best Salesforce Training Institutes in Noida

Best Aws Training Institutes in Noida

best aws training in noida

aws training institute in noida

best data science training institute in delhi

python Training Institute in noida

sas Training Institute in noida

linux Training Institute in noida



svr online Training said...


Quite interesting post,Thanks for sharing the information.Keep updating good stuff...
sap abap crm training

sofianan said...

Amazing post.Thanks for your details and explanations..I want more information from your side.Thank you
Trading erp software in chennai

akmin karthick said...

www.sitegalore.com

gowsalya saranya said...

Existing without the answers to the difficulties you’ve sorted out through this guide is a critical case, as well as the kind which could have badly affected my entire career if I had not discovered your website.
Digital Marketing Training in Chennai

Aws Training in Chennai

Selenium Training in Chennai

johnsy sai said...

Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
Digital Marketing Training in Bangalore

digital marketing training in tambaram

digital marketing training in annanagar

digital marketing training in marathahalli

digital marketing training in rajajinagar

Digital Marketing online training

Mouni yoga said...

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post I would like to read this
python training institute in chennai
python training in chennai
python training in chennai

aruna raj said...

Excellent blog, I wish to share your post with my folks circle. It’s really helped me a lot, so keep sharing post like this
Blueprism training in annanagar

Blueprism training in velachery

Blueprism training in marathahalli

nivatha said...

This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
Data science training in tambaram
Data Science training in anna nagar
Data Science training in chennai
Data science training in Bangalore
Data Science training in marathahalli
Data Science training in btm

sudha P said...

Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
java training in chennai | java training in bangalore


java training in tambaram | java training in velachery

Genga Savitha said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

pavithra dass said...

I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.
Android Training in Chennai
Android training
Android training near me
Android Course in Chennai
Android Development Course in Chennai