This post is about how to prepare for a job in companies like Microsoft, Amazon , Adobe etc on a short notice say 2 weeks.
Mostly I am giving out a set of coding question if one does , he/she will be ready to crack software engineering interviews at these companies.
For now I am only giving a list of algorithmic problems. Object oriented design and system design problems will be a part of a separate blog.
This list is my personal choice and I have built and used it in the last few years preparing for interviews with success.
There is not much of an advice here , just that go ahead and try the problems , if you have any questions ping me on facebook https://www.facebook.com/prashant.priyadarshi.35 .
So lets begin.
List of data structures to code :
- ArrayList, LinkedList , Stack, HashMap, LinkedHashMap, ConcurrentHashMap , HashSet, TreeSet , Heap , Trie.
- You should know when to use linked list over arraylist and vice versa see: https://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist
- Also You should know how a HashMap works internally and should be able to code it.You will be asked to code hashmap directly or either use it with a doubly linked list in an LRU cache https://www.interviewbit.com/problems/lru-cache/
- For testing heaps this question can be asked: https://leetcode.com/problems/find-median-from-data-stream/description/
Now We have a topic wise list of questions.
Array:
- https://www.interviewbit.com/problems/hotel-bookings-possible/
- https://www.interviewbit.com/problems/maximum-unsorted-subarray/
- https://www.interviewbit.com/problems/merge-overlapping-intervals/
- https://www.interviewbit.com/problems/find-permutation/
- https://www.interviewbit.com/problems/next-permutation/
- https://www.interviewbit.com/problems/n3-repeat-number/
- https://www.interviewbit.com/problems/flip/
Linked Lists:
- https://www.interviewbit.com/problems/reorder-list/
- https://www.interviewbit.com/problems/reverse-link-list-ii/ (many details to handle)
- https://www.interviewbit.com/problems/sort-list/
- https://www.interviewbit.com/problems/k-reverse-linked-list/ (frequently asked)
Stacks and Queues:
- https://www.interviewbit.com/problems/nearest-smaller-element/
- https://www.interviewbit.com/problems/largest-rectangle-in-histogram/ (this problem uses trick in above problem (nearest-smaller-element)
- https://www.interviewbit.com/problems/rain-water-trapped/
Tree:
- https://www.interviewbit.com/problems/populate-next-right-pointers-tree/
- https://www.interviewbit.com/problems/order-of-people-heights/ ( you need segment tree to do it in nlogn)
- https://www.interviewbit.com/problems/2sum-binary-tree/ (use tree iterator here)
- https://www.interviewbit.com/problems/construct-binary-tree-from-inorder-and-postorder/
- https://www.interviewbit.com/problems/postorder-traversal/
- https://www.interviewbit.com/problems/recover-binary-search-tree/
BitWise Operator:
- https://www.interviewbit.com/problems/different-bits-sum-pairwise/
- https://www.interviewbit.com/problems/min-xor-value/
Greedy:
- https://www.interviewbit.com/problems/distribute-candy/
- https://www.interviewbit.com/problems/majority-element/
Binary Search:
- https://www.interviewbit.com/problems/median-of-array/
- https://www.interviewbit.com/problems/rotated-sorted-array-search/
- https://www.interviewbit.com/problems/allocate-books/
- https://www.interviewbit.com/problems/matrix-median/
Dynamic Programming
- https://www.interviewbit.com/problems/regular-expression-ii/
- https://www.interviewbit.com/problems/rod-cutting/
- https://www.interviewbit.com/problems/shortest-common-superstring/
Graph Theory :
- https://www.interviewbit.com/problems/clone-graph/
- https://www.interviewbit.com/problems/word-ladder-ii/
- https://www.interviewbit.com/problems/largest-distance-between-nodes-of-a-tree/
Others:
- http://www.geeksforgeeks.org/date-after-adding-given-number-of-days-to-the-given-date/
- http://www.geeksforgeeks.org/find-number-of-days-between-two-given-dates/
If you want to get a look and feel of the process I recommend you reading these:
- http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html
- http://www.crackingthecodinginterview.com/
Very Good info. It is a great guide for other aspirants. Please keep writing such article.
ReplyDelete