Initial Online Screening:
There were 3 questions conducted in hackerrank:
- I dont remember the first one .
- Your job was to find the number of elements in the set of any number. Only those numbers will be there in set which are isomorphic to the given number.
Input : 11
Output : 9
because 11, 22, 33, 44, 55, 66, 77, 88, 99 are all isomorphic
- It was a tree question.it was tough.
On site interview in Hyderabad
This round was a screening round ( technical + hr )
The interview lasted for 35 – 40 mins. It started with : Introduce yourself.
I did that for 3 mins. Then they asked about the project in my resume. It was done in PHP / HTML / SQL.
It was live so i showed them online.They asked me few questions about it.
Then they Asked me one algorithm question:
- How to Maximize the profit if you are given the rates of stock in a day array.
I asked them a counter question if we have limit on the number of times we can buy and sell? They said no.
Also if we could sell and buy on the same day.
I gave them O(n) solution for the problem. Using local maxima and minima method.
They then asked me one SQL question:
1. Given two tables.
In inventory negative qty tells that the product was sold.The question was to generate a report consisting of all the products that were sold and how much was the total sale for that particular product?
select o.pid, product.name, sum(o.qty)*product.price
from orderhistory o
JOIN product product
GROUP by o.pid, product.name
They then asked questions on OOPS / Java.
Difference between inheritance and abstract classes.
This round went for 1 hr 15 mins
- Tell me about yourself?
- Algorithm Question similar to https://www.geeksforgeeks.org/nuts-bolts-problem-lock-key-problem/
I gave an inital solution of O(n^2) complexity. They asked me to optimize it. I tried a lot then figured out a solution similar to quicksort using. So overall complexity was O(nlogn)
- They asked me a bar raiser question. To design a Parking Lot System . I talked to interviewer and figured out the main features to be required.
Take help from : https://www.geeksforgeeks.org/design-parking-lot-using-object-oriented-principles/