Open In App

Sirion Labs Interview Experience (Off-Campus FTE)

Last Updated : 29 Oct, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

Round 1:

It was a screening test consisting of 2 coding questions and 12 mcqs on OS, OOP(Java) and time complexity.
1) You are given an array of integers, you have to put them in an order such that all the prime numbers are in ascending order and the composite ones are in descending order (in-place)
Input: 5, 4, 3, 7, 8, 10
Output: 3, 10, 5, 7, 8, 4
I used sieve method, 2 priority queues and 1 Boolean array for, if i-th integer is prime, then true. Loop through the array and check if i-th position consisted of prime number in original array then poll from a priority queue which consists of prime.
2) You are given a cost array of length 9 that says the cost of picking the i(1 to 9) and some price money. You have to construct the largest number possible with that given price.

Round 2:

It was a telephonic round. Questions only on Java were asked and on my current project which I was doing in the company. I remember some questions which were:
1) Difference between String s=”Rishabh” and String s=new String(“Rishabh”)
2) What is unique about String? (Immutability)
3) How can you make a class immutable. I said by assigning a wrapper class to it. He asked me what if we have to change something within that class. I told him that we can make the class final so that it couldn’t be inherited. And he said yes apart from that you can make fields private and remove setter method.
4) Internal implementation of HashMap
5) Why can’t we make abstract class final.
It was more of a discussion rather than an interview.

Round 3:

The guy asked me if I knew any RDBMS. I said MySQL. Then he asked 2 problems on data structures and algorithms which were:
1) Suppose A=1, B=2, .., Z=26. Given a number how many strings can be made from that.
Input: 1234
Output: 3
ABCD, LCD, AXD
It was a modified version of Fibonacci sequence and I could correctly make it out.
2) (Pre-Diwali Bonus :p) You are given an array of size n and a number k (0<=k<n). You have to put the elements from k+1 to n-1 in the beginning of the array using O(1) space and O(n) time.
Input: array=1, 2, 3, 4, 5, 6, 7 and k=3
Output: 5, 6, 7, 1, 2, 3, 4
Reverse the array from k+1 to end.
Reverse the array from 1 to k.
Reverse the whole array.
Then he asked my to write a query. The question was:
You are given a Person table whose attributes are ID, name and age. You have to find all the persons with 2nd maximum age.
I gave him the query.
He asked me for 3rd highest.
I instantly nested one more query in that query.
He asked me for n-th highest. I told him that declare keyword and for loop will be used but I don’t exactly remember the syntax right now.
Then he asked me some questions on Java, of which I know few, like:
1) Why do we use interface? I said for multiple inheritance and 100% abstraction.
2) What is the type of methods and variables in interface?
3) Why variables are final and why methods are not final?
Round 4:
It was a call from HR regarding whether you’ll be able to relocate to Gurgaon. I said yes. Then she discussed regarding compensation.
Finally got selected for software engineer role (Java Developer).

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads