Others

SUTHERSAN.V
0
0
260

1 year ago
DIRECTI INTERVIEW EXPERIENCES
I applied for Directi off-campus on its career website and I got a call. There were total 5 rounds.
Online coding round: 1.5 hours
There were a total of 3 questions. All of them were coding questions covering ad-hoc, dp ,hashing ,graphs etc and you could do it only if you do regular online competitive coding. This round was the toughest and you should pick wisely, the questions you want to attempt. I did two of these.
Q1- Blueberry Cheese Cake:
Problem description
There is a school in a village. It has N classes. One fine day, someone donated B blue berry cheese cakes to schools. Now you need to divide these cakes such that:
Each class gets at least 1 cake.
Each class will share the cake(s) among students.
Your aim is to minimize the maximum number of students per cake in any class.
Input
The first line of the input contains two space separated integers N and B denoting the number of classes and total number of blue berry cheese cakes, respectively.
Next N lines contain number of students in each class.
Output
For each test case, output the maximum number of students who will share a cake.
Constraints
2 <= N <= 5*105 N <= B <= 2*106 1 <= number of students in ith class <= 5*106 Sample Input - 1 1 2 35 Sample Output - 1 18 Sample Input - 2 2 7 20 50 Sample Output - 2 10
Q2: Poor Valet
Our Chef is opening a new restaurant in the city. Today being the inauguration night of his new restaurant and Chefâ??s huge popularity has attracted a large crowd for the grand opening. For convenience of the customers, cars of all the customers have been marked with a number from 1 to N where N is the total number of cars, corresponding to their parking space number in which each car has to be parked. Due to the large crowd, the car parking is full except for one parking space. Moreover, as the cars came too frequently, they could not be parked in their respective parking space. Poor valet at the restaurantâ??s parking, Raka, is left with the arduous task of parking the cars at their respective places. Luckily for him, parking has been closed and no more cars are coming and he can now arrange the cars in their proper places. As Raka is left alone to park the cars, he can only move one car from one parking to the
other parking. He can use the empty parking space to move the cars aroung. He wants to arrange the cars in as few moves as possible. Raka asks you for help in finding the optimal strategy to arrange cars in their proper places.
Input
An integer T denoting the number of test cases.
For each test cases there are 2 lines.
The first line cointans a single integer N where N denotes the number of cars.
The second line contains N integers
K0 to KN-1 where Ki represents the number marked on the car standing at parking space number i in the initial configuration.
Parking lot number N is left empty.
Output
For each test output a single integer M, where M is the number of car moves required to arrange all the cars to their proper location.
Example
Input:
2
3
1 0 2
4
2 1 3 0
Output:
3
4
Q3: XML Validator
Problem description
Letâ??s define a string as an opening tag, where x is any small letter of the Latin alphabet.
Each opening tag matches a closing tag of the type , where x is the same letter.
Tegs can be nested into each other i.e., one opening and closing tag pair can be located inside another pair.
Letâ??s define the notion of a XML-text:
1) An empty string is a XML-text
2) If S is a XML-text, then â?? S â?? (quotes and spaces are for clarity) also is a XML-text,
where a is any small Latin letter
3) If S1, S2 are XML-texts, then â??S1 S2â?? (quotes and spaces are for clarity) also is a XML-text
You are given a string. You have to verify if the given string is a valid xml or not.
Input
First line contain T number of test cases
For each test case:
Only one line containing xml tagged string S.
Output
For each test case,
One line containing a string TRUE if s is a valid xml FALSE if it is not.
Constraints
0 < T <= 10 0 < length of S <= 10^5 Example Input: 2 <a><b></b></a>
<a><b></a>
Output:
TRUE
FALSE
Explanation
In the first example, <b></b> is a valid xml text inside another valid xml text <a></a>.
Hence total string is XML text
In the second example <b> has no matching pair and hence string is not valid xml text
Round 2 : Face to face (Skype- 1 hour)
This was a DS+ Algorithm +coding round. They said there will be three DS+Algo rounds and it is necessary to pass any two of them , I passed the first two so they didnâ??t took my third.
Q1- Given n ranges [a1, b1], [a2, b2], [a3, b3]â?¦. [an, bn] where all the ranges lie between [0, 10^6]. All the entries are integers. Give total number of unique integers across all the ranges.
Example:
Input:
[1, 3]
[4, 9]
[3, 7]
output: 9
Here he insisted on making optimal code after my first approach, and approved the second one and asked me to code it. It has some good corner cases.
Q2 : Check if an array can be divided into pairs whose sum is divisible by k.
Input: arr[] = {92, 75, 65, 48, 45, 35}, k = 10
Output: True
We can divide array into (92, 48), (75, 65) and
(45, 35). Sum of all these pairs is a multiple of 10.
Round 3: Face to Face (skype â?? 1 hour)
Also a DS Algo round. One question was asked in this round.
He asked to explain about graphs and dfs general questions and asked to explain dfs code and what are its applications. Then he gave me a question.
Q-You are given a tree .Each node can have any number of children not specific. Now we create a string of 0s and 1s .Firstly assume you are traversing in dfs so whenever you traverse a node you write append 1 in string traverse all its children and grandchildren, now when you again return to this particular node with all children traversed you append 0 to string and return further up . This way you have to string with whole traversal .
Example take a tree with a root, its two children and the left child has one more child. Its corresponding string will be 11100100.
Now the actual question is, given this string for a tree, firstly obtain this tree structure from this string and secondly identify whether this corresponding tree structure can have more than 1 string possible i.e other than the one given.
(Hint : DFS can be done in different ways depending on which child you traverse first. Also think on tree isomorphism, for all its sub children.)
I took time ,discussed every step with him, he was helpful and he asked me to make the code. I was able to do it, this interview lasted 80 mins.
Round 4 : Tech Round (Skype â?? 45 mins)
This round consisted of OS, DBMS , Networks and basic computer fundamentals. We had a detailed discussion on all answers
Q1- about producer consumer process and all its conceptual details
Q2-solution of producer consumer problem, all the solutions(hardware and software) with explanation of all of the three conditions with examples(mutual exclusion, progress and bounded wait)
Q3-. It led to locks and semaphores. Asked me what is mutex locks and applications of locks and semaphores.
Q4- Process related one question, explaining for one program all its stages as a process and its processing (basically the new->ready->running etc).
Q5- What is swapper?Its working.
Q6- Dispatcher and functioning.
Q7- Thrashing and consequently then he went asking demand paging segementation.
Q8- What is HTTP? How is it a stateless protocol.
Q9- OSI model and its real life analogy if I knew any.
Q10- TCP/IP model and how is it different than OSI.
Q11- One SQL query ,I donâ??t remember exactly, but it was on group by and had concepts of sub-query and join.
Q12- Asked me indexing, types and which data structure to use.I told Btrees, and asked to explain how and why it helps. He confused me with BSTs and asked although Time complexity will be same , then why Btree (I thought and discussed ,then came to conclusion about Disk writes)
Round 5 :(overall -1:30 hours ,Skype)
This was taken by some big person sounded like senior manager/ED.
This was total tech+ds+algo+HR.
Q1-Asked me about my internship project in detail, about technologies used, how much I contributed etc.
Q2- Design a Localized Twitter, which shows the tweets of people within 2 miles of radius . Handling the cases
2.1-Everytime a person tweets (within 2 mile) it should appear on your page instantly, basically Pushing. (optimization of this was asked)
2.2-Design the database tables, show relationships between them, what attributes am I taking and why ?
2.3- Asked to write 2 queries about pulling data from Database.
2.4-Asked to optimize one query, I gave some methods about using joins and subquries but he gave a hint of using indexing , so I used indexing (used Btrees for indexing â?? didnâ??t write btree code, just concept)
Q3-Explained me a concept i.e given an array of size n, containing numbers from 1 to n, asked me to write an array containing the current numbers nearest number in its left ,which is smaller than current number.
Now question is given this (second one) array only, can you make the previous one? Asked me to code my logic.

View
Others

Dhananjay Dogra
0
10
882

1 year ago
SIRIUS CAMPUS PLACEMENT EXPERIENCE
Round 1 (26.6.2018) (450+ people Approx)
The first round was a written round with 60 Questions from the following topics to be completed in 60 minutes.
It was an online MCQ test.
Topics:
1. DMBS
2. C
3. JAVA( Inheritance and Collections)
4. LINUX
5. HTML, CSS, JAVASCRIPT
Speed and accuracy would count in this round.
There was no negative marking though.
Round 2 (27.6.18 ) (55 people)
The next round on the next day was a Technical Interview. (One to One Interview)
Being confident in whatever you speak would be the key to crack this round.
Convince them in whatever you say and make sure it is correct.
The interviewer was very friendly and greeted me with a fine smile and a handshake at the beginning of the interview.
He was generous enough to make me thoroughly understand the question and gave little clues here and there to make me think in the particular direction to get to the right answer.
Questions were mainly asked regarding the Area of Interest and Projects mentioned in the resume.
Being thorough and to the point would certainly be a plus.
Try to keep it short and technical, even if they ask â??Tell me about yourself at the beginningâ?? give a small intro and jump to projects and achievements.
Being neatly dressed and disciplined would surely come in handy.
(Find out the Palindrome in linkedlist).
Round 3 (13 people)
The third round was a programming round and this was the first time it has been introduced in this company and the time limit for this round was only 60 minutes.
This acts as another round to help them eliminate people.
This was not a computer based round. We were given a question paper and an empty cabin where we had to pen down our ideas and approaches for each problem.
2 questions from general programming were asked which were easy.
{
1. find out pivot element from the given list of elements where pivot is the element who right side sum of elements is equal to left side sum of elements.
2. find out the exit in a given maze of 0's and 1's. i used backtracking and recursion to solve this.
}
1 puzzle (12 coin puzzle) was asked.
1 bonus question related to data structure and process scheduling algorithm was asked. This was the most challenging question of the lot.
Options to solve either the bonus question fully or the other 3 was given.
I tried to quickly finish the 3 easy ones in the first half hour and then went on to do the bonus question.
Although no one managed to completely solved the third question they checked how well we understood the question and how we tackled it.
Also the choice of data structures we chose played a vital role in determining who to select for the next round.
We were asked to explain our answers for all the 4 questions to random panel members and then finally the bonus question alone had to be explained once again to the Practice Manager in person.
It was a good experience as he was very keen and attentive to know the approach everyone had used.
Round 4 (6 People)
The final round was again Technical Interview and there was no specific order to go into the room. They asked who would like to volunteer and I immediately got up in order to grab the first chance.
This demonstrates confidence and gives them a good impression about you when you later say â??I actively take up responsibilities and leadershipâ??.
The interview consisted of 8 members in total. It might sound scary at first however if you are familiar with what you have written in your resume and can confidently defend it, the entire process would be a walk in the park for you.
They asked me about my favourite subject, to which I replied â??MATHEMATICSâ??.
From that instance the next 5-6 questions were from mathematics. From equation of line and circle to finding the nearest point to a given line.
Again answering everything correctly is as important as the way you take the question and try to think about it.
I did not get the answer for the nearest point to line question however I tried 2-3 approaches like drawing 2 parallel lines to the given line and also drawing a circle around the given round.
Interviewer: What is your preferred area of interest ?
Me: Sir, OOPS and Data Structures.
Next round of questions were undoubtedly from the above mentioned topics. Some of them were moderate whilst some of them were difficult. However they noticed how many and what all approaches I used to tackle it.
At a point of time I couldnâ??t get the answer to the given problem and I asked if I could get another question. To which he did give another question and I was able to solve the next one the same way they expected.
There were instances where all of us had a light laugh, but one must not get carried away and get back to the task at hand.
One of the projects I mentioned was the Smart India Hackathon 2018 problem statement to which the interviewer asked me if I could draw a schematic of the idea on a piece of paper while other 5 people were yet to give their interview. I immediately took up the task and went outside and started to recollect the workings in order to get the schematic on the paper.
It took a good 2.15 hours of time for everyone to finish their interview and I thought they might forget to ask me for the diagram.
To my surprise the last person who came out of the panel after his interview informed me that I have been called inside.
I went inside and presented the schematic and was explaining the entire project when the Practice Manager asked to stop and told me to wait outside.
He did greet me before sending me outside saying it was nice talking to you Dhananjay, please wait outside, We will get back to you.
10 minutes after this all the 8 panel members came out with 2 resumes in their hand.
It was the most crucial moment of the long day which started at 7:30 AM and finally at around 9:20 they announced 2 people have been selected.
Me and another person from VCET Madurai. It was the best moment of the entire day.
But it didnâ??t end here. They called both of us inside the panel room again and informed that one has been given an offer whilst another has been given an internship.
This again caused a feeling of distress as to who would get what. Both of us were puzzled as to what will happen next. Then the manager asked us to ask each other a very difficult question, such that the other person canâ??t answer and gave a condition. Whoever wins the question game will get the offer and the other person would get the internship. So I quickly took the opportunity to ask him a question which would definitely have a diplomatic answer.
I asked him if u choose to take the offer how would you justify it. At my question everyone broke out in laughter and the manager whispered to me that it was a smart question.
We gave out point of views as to why we should get the offer and not the internship and at last they revealed that they were only teasing us and both of us have already been given the offer. They handed us our offer letters enclosed in an envelope.
At last both of us were elated and signed out offer letters.
This is how my placement happened.
I feel at the end of the day the way we present ourselves and how much homework we do to justify our actions in the interview matter the most.
Also this was a result of the enormous amount of guidance of several teachers and friends and the will to repeatedly try and try till the end.

View