I applied through a staffing agency. The process took 2 days. I interviewed at Software AG (Bengaluru) in Jul 2016
Interview
Got a call from consultant for Principal Engineer position with experience in Core Java and multi threading. I went for a face to face discussion to the Software AG office. After waiting for around 45 minutes was interviewed by 2 people in the first round.The interviewers were pretty cool and asked me about the comfort areas.The questions in first round were focused on Java collections , multi threading, design patterns and OOP concepts and principles.The second round was on problem solving and analytical skills where one can expect questions on algorithms and data structures. The interviewer asked me to rate myself on these areas.The difficulty of the problems would be on the basis of my rating. I was not selected for the third round, which was on Design & Architecture. Candidates are expected to have subsequent rounds with hiring manager HR and VP
Interview questions [1]
Question 1
Round 1:
What principles should be followed when exposing a function from a Java library.
Can custom exceptions be sub classes of Runtime exception class.
The time complexity of add and get operation for ArrayList,LinkedList,HashSet,TreeSet,HashMap and TreeMap. When should each of these data structures be used.
Difference between ConcurrentHashMap,synchronized Map,HashMap. How locking is done on portion of the Map in ConcurrentHashMap.
Describe the different areas in Java heap.
Why composition is favored over inheritance.
Why ReentrantLock is needed.
Given a class with one String field and int field, what needs to be done to store object reference in ArrayList,TreeSet,HashMap
Write a program which starts 3 threads,and the first thread to execute prints " Execution started" the last thread to terminate prints "Execution completed". The 3 threads should print numbers in different ranges.(1 -10,11-20,21-30)
Was given a design problem on Observer pattern and asked to explain and draw the class diagram.
Round 2
Given 2 arrays of size N and M (N > M ), print the intersection of the arrays. Derive the time complexity.You cannot use any other data structure .
Since I used binary search in my implementation was asked to write function for binary search
Given a 5 digit number, write program to find the next higher number using the digits.
Example 56123 --> 56132
Given the stock prices of a particular stock over 10 days. Write a function to calculate maximum possible profit
All the cases needed the most optimized solution.