Round 0: Online Coding Test (90 Min - 4 Coding Questions)
-
Run length encoding
Input : aaaaaabb Output : a5b2 Input :aaaaabccc Output :a5bc3
- Linked List pair sum count
Input : list = 0 -> 2 -> 5 -> 7 -> 4 -> 6 -> 10 -> 20 -> -10 -> Null Sum = 10 Output : 3 Explanation: (4, 6) (0, 10) (20, -10) - Rotate Doubly Linked List by N time
Input : NULL <= a =><= b =><= c =><= d =><= e =><= f =><= g =><= h => NULL Num = 4 Output : NULL <= e =><= f =><= g =><= h =><= a =><= b =><= c =><= d => NULLGeeksforGeeks Link - Given Binary Tree, find level of x node if x is present otherwise return 0. GeeksforGeeks Link
- Project Biggest Challenge and how did you solve it ? (Choose recent & best)
- Tell me a time when you mentor someone ?
- Tell me a time when your manager was not there and you had to take up some important decision ?
- Tell me a time when you have to deep dive into something on your own ?
- Detailed discussion on project and design of it, how will you scale your project to support n number of users. Focus was on scalability & distributed design.
- Design a job scheduler, scalability, fault tolerance, high availability, how scheduler picks up job, how will you take care where one job can run for 30 min and one for 30 hour, how will you distribute jobs on servers. Based on frequency & time how will you execute them ? How will you notify back the user about start/stop or completion of a job ? How will your system know if a job is killed / terminated due to unknown reasons ?
-
Given array and a Linked List where elements will be from the array but can also be duplicated.
Sort the linked list in the order, elements are appearing in the array. O(n) complexity was expected. Complete running code on paper was expected. All boundary condition checks were expected.
Input : arr = {5, 1, 3, 2, 8} list = 3 -> 2 -> 5 -> 8 -> 5 -> 2 -> 1 -> X Output : 5 5 1 3 2 2 8GeeksforGeeks Link
-
Given a n-ary tree, basically a graph but connected and doesn't contain cycle.
every edge is given a weight, identify all paths from all vertex to all vertex & then sum of all paths.
Give final result as sum of all paths.
Ex: 10 20 A-------B--------E 30/ \40 \ 50 / \ \ C D F Here all paths and their sum are as follows: Ans should be sum of all of them. A-B = 10 A-E = (10+20) A-F = (10+50) A-C = 30 A-D = 40 B-E = 20 B-F = 50 B-C = (10+30) B-D = (10+40) C-D = (30+40) C-E = (30+10+20) C-F = (30+10+50) D-E = (40+10+20) D-F = (40+10+50) E-F = (20+50)
First write the data structure to solve this problem, then efficient algorithm, then complete working code on paper.
- Please do prepare for behaviour questions as well. Have one or two example ready for all the questions. Most of them are available here : https://www.kraftshala.com/how-to-raise-the-bar-in-the-amazon-interview/
- Prepare for design rounds seriously, they look for scalability, high availability & distributed system architecture in your design.
- For coding prepare your basics and have them thorough, practice using pen & paper for writing code.