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)
- Walmart Interview Experience for SDE2 | Set 19 (3.8 years experience)
- McAfee Interview Experience | Set 1 (On-Campus)
- McAfee Interview Experience | Set 2 (On-Campus)
- McAfee Interview Experience | Set 3
- Ixigo Interview Experienced for SDE2 Backend
- Amazon Interview Experience for SDE2 (3 years exp)
- Amazon Interview Experience | Set 154 (For SDE2)
- Flipkart Interview Experience | Set 28 (For SDE2)
- Amazon Interview Experience | Set 260 (For SDE2)
- Amazon Interview experience | Set 324 (For SDE2)
- Amazon Interview Experience | Set 381 (For SDE2)
- OYO Rooms Interview Experience | Set 5 (For SDE2)
- ixigo Interview Experience | For SDE2 Backend
- Amazon Interview Experience | Set 430 (For SDE2)
- Amazon Interview Experience | Set 431 (For SDE2)
- Traveloka Interview Experience for SDE2
- Amazon Interview Experience SDE2
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.