Tip 1 : Keep practising questions on Data Structures and Algorithms to enhance problem-solving skills.
Tip 2 : Do at least one project with a proper understanding of underlying concepts.
Tip 3 : Coursework are important
Tip 1 : Have at least one project.
Tip 2 : Do not put things which you are not completely comfortable.
Timing: 6 PM to 7:30 PM IST
Environment: Test took place on Hackerrank. The test was proctored.
Details: 4 questions with varying difficulty were there. Partial score was allowed.
The initial satisfaction of a person of type A is 80. It decreases by 20 for each neighbor.
The initial satisfaction of a person of type B is 50. It increases by 10 for each neighbor.
You may choose exactly how many people you want to be present in the grid.
The total number of people of type ‘A’ living in the grid can be less than ‘countA’ but cannot exceed ‘countA’. Similarly, total number of people of type ‘B’ living in the grid can be less than ‘countB’ but cannot exceed ‘countB’
A person can live in only one cell.
Not more than one person can live in a cell.
Two cells are said to be neighbors if the cells are adjacent and share a boundary.
The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:
Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
n = 4, roads = [ [1, 1, 1, 0],
[1, 1, 1, 0],
[1, 1, 1, 0],
[0, 0, 0, 1] ]
So, there are ‘2’ provinces.
1. A city is connected to itself. So, for every city ‘i’, ‘roads[i][i] = 1’.
Problems were asked from projects, and with one easy algorithm problem, they tested problem-solving skill.
The interview started with an introduction, post which my projects were discussed.
Out of two projects, one was discussed for about 15 minutes, and another for 5 minutes. The questions were more on underlying concepts, its conceptual working, rather than implementation details. They were satisfied with my answer.
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
In this round, my project was discussed for 5 minutes, and later only OS, DBMS was asked. No coding problems were asked.
It was more of a discussion round for me.
One of the interviewers had 20+ years of experience, while the other 7+ years of eperience.
Questions were mostly asked from the OS course (nearly 45 minutes) and had a healthy discussion. I didn't knew the answers to a few questions, of which the interviewer explained the answer.
Explain Normal Forms in Database
Explain Indexed in Database
fork() and exec() system call
Retrieve parent ID in the child process.
How to communicate between parent and child.
Illustrate pipes (in OS) in C
What are semaphores?
What is process, and what are the steps in the compilation of C program.
What are zombie process, orphan process?
How does zombie process gets killed?
What are threads?
What is an interpreter?
For same program in shell and C, which will be faster?
All possible return values of fork system call.
Necessary condition for making a pipe()
How to kill a thread?
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which traversal uses a queue as its primary data structure?