Sei sulla pagina 1di 2

Posted by Subrata Kundu in Bangalore skills Development Program on Nov 22, 2016 10:51:23 PM

There were total 4 F2F rounds happened back to back on the same day. Last round was supposed to be
managerial but that also turned out to be a Technical mostly.

First Round --
1. Write your own LinkedList with operations like add(), addBegining(), addMiddle(), Reverse(),
Find()
2. Explain Merge Sort with examples(In detail), Time Complexity of Merge Sort and explain how it
is nlogn.
3. Write Code for Producer Consumer Problem(Using both wait notify and BlockingQueue), change
the code if One producer and two consumer is there.
4. ConcurrentHashMap internal structure.
5. ReadWriteLock.
6. How do you override hashCode method generally?

Second Round --
1. Sort an Array with O's and 1's.(Optimum Solution)
2. How Volatile works internally?
3. int i = 10+i;
volatile String volStr = "CED"+some other String;
Now if two thread is accessing this piece of code and how the behaviour will be?(Need to explain
Happens-Before Concept)
4. Binary Search Tree, Write Code for Pre-Order traversal of a BST.
5. Design a Parking Lot System.
6. What are the advantages of Executors Service over normal Thread Pool(Custom).
7. On what sense ConcurrentHashMap works better over HashMap?
8. If one thread is putting some K,V to a ConcurrentHashMap and other threads reading it, will they
see always updated value? If Yes How? If not why not?
9. Use case of Thread Local Variable?
10. Write code to print Even and Odd numbers sequentially using two different thread.

Third Round --

1. What is the biggest disadvantage of HashMap?(While re-hashing it may go for infinite loop if two
threads are simultaneously accessing the HashMap)
2. what is the change in "final" behaviour from Java 1.5 in terms of JMM?
3. List<Employee> list = new ArrayList<Employee>();
Now suppose you have added 100 Employee objects in the list.and then --
List<Employee> l2 = list.clone();
How many objects will be created by this piece of code and how?

4. Synchronized block is having Read Barrier/Write Barrier and Volatile is also having same behaviour but then
what is difference between this two?
5. How AtomicInteger works internally? CAS Operation?
6. Design a Service Bus System where there are multiple Publisher and multiple Listener. Multiple
Listener can listened to one publisher message. How will you design
this system?
7. Design a system where -- one thread t0 is generating some numbers and we need to pass this
numbers to three different service - First Service will print the
number, Second service will save the number in DB and Third service will send the number to
3rdParty System to save it. But if any of this service will fail then we need to roll-back all other
service operation and from t0 thread we need to erred out some message. Again from Second
number continue the same.

Fourth Round(Managerial+technical) --

1. General Managerial Questions like How will you cope up in IB domain as you never worked in this
domain? What do you expect from Wells Fargo work wise?
2. Tell some fine tuning parameters of Garbage Collector and JVM.
3. Default Garbage Collector?
4. Which one is best CMS or G1? G1 wins the game where w.r.t CMS?
5. To get most latency which GC you will choose?
6. Explain G1(Not in very depth)
7. Can we create an Object which will not go to Heap?(Generally Any Object we create goes to Heap
only)
8. How can we find top two distinct element from a Non-duplicate, Non-ordered array with millions of
records.
9. Which Collection is best to implement LRU Cache and how?
10. TreeSet tree = new TreeSet();
tree.add(4);
tree.add("ABC");
Do you see any problem in this? If yes when - Compile time or Runtime and Why?
11. Given two jars J1 and J2 and 50 Red Balls and 50 Black Balls. Put the balls in any combination in
those two jars such that while taking out the ball from the
Jars the probability of getting Red Balls will be of highest possible probability.

Potrebbero piacerti anche