This interview was for the SDE-2 position. The recruiter contacted me via LinkedIn.com
Question was asked that was based on array data structures and one java oops related question.
1. Hash map vs Concurrent hash map
2. Internal implementation of hash map
5. Another data structure related question which I couldn’t remember
1. Explain project in detail
5. Fizz buzz printing
Write an efficient program which takes an input argument say n. Start from number 1 to n (inclusive) and if number is multiple of 3 then print “Fizz”, if number is multiple of 5 then print “Buzz”, if number is multiple of both 3 and 5 then print “FizzBuzz”. The interviewer was looking for code with just two ‘IF’ statements.
1. Usage of synchronize keyword
2. Find graph type from given coordinates
Here we are given 4 types of graphs and we have an API which takes co-ordinates say (x1, y1) and (x2, y2). Everytime the API is invoked it would return the next coordinate in the plane. We have to find the type of graph with minimum number of API invocation.
Graph Types were Strictly increasing line, Strictly decreasing line, Increasing then Decreasing plane and Decreasing and Increasing plane.
3. Explain Singleton design pattern
4. Explain Factory design pattern
This was a non technical round with only behavioral questions.
1. Dynamic Dispatcher
2. Atomic keyword and volatile keyword
3. Externalizable interface
4. Having a method definition inside an interface but java version is 1.7 hence default shouldn’t be used.
5. Usage of try with resource block
6. Difference between upcasting and downcasting and when we should use them.
7. Creating thread without using thread class and runnable interface
8. Shutdown hook
9. 5 features in Java 1.8 and 1.9
10. Executor Pool vs Thread Join Pool
11. There are 3 threads running independently how to ensure 1st thread runs more frequently
12. Different ways of applying lock on hash map
13. How hash set is implemented internally and question if hash set uses hash map internally or hash map uses hash set internally.
Round-7 (Hiring Manager)
Given a 2D array with 5 Rows and 3 Columns and a number n. Print all combinations of the array elements upto n. Example;
Array elements are;
a b c
d e f
g h i
j k l
m n o
If n is 2 then output should be: ad ae af bd be bf cd ce cf
If n is 3 then output should be: adg adh adi aeg aeh aei afg afh afi bdg … (and so on)
- Microsoft Interview experience | Set 114 (2.5 Years Experienced for SDE2)
- Amazon Interview Experience for SDE2 | 3+ years Experienced
- Groupon Interview Experience | Set 4 (SDE2 for Experienced)
- Amazon Interview Experience for SDE2 (3 years exp)
- Walmart Interview Experience for SDE2 | Set 19 (3.8 years experience)
- OYO Interview Experience | Set 11 (For 2 years experienced)
- Oyo Interview Experience | 3.5 years Experienced for SDE-2
- Oyo Interview Experience | 3 years Experienced for SDE-2
- Microsoft Interview Experience | Set 112 (For 4.5 Years Experienced)
- Amazon Interview experience | Set 334 (For 4.5 Years Experienced)
- Apptio Interview Experience | SDE-1 for 2.3 years experienced
- Adobe Interview Experience | Set 39 (1.5 Years Experienced)
- Adobe Interview Experience | Set 37 (3.5 Years Experienced)
- Oracle Interview Experience | Set 44 (For 4.5 Years Experienced)
- Microsoft interview experience: | Set 167 (7 Years Experienced)
- Amazon Interview Experience | Set 340 (3.5 years experienced for SDE 1)
- Paytm Interview Experience For Experienced (2.5 years)
- BirlaSoft Interview Experience | 2.2 years Experienced
- Paytm Interview Experience | Set 11 (For 2 Years Experienced)
- Paytm Interview Experience (5 Years Experienced)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.