Tip 1 : Be consistent in coding and contests
Tip 2 : Should have knowledge of system design not whole but basic
Tip 3 : Should have knowledge of design questionsTip 1 :Be consistent in coding and contests
Tip 2 : Should have knowledge of system design not whole but basic
Tip 3 : Should have knowledge of design questions
Tip 1: Have at least one project on your resume
Tip 2: resume should be one page only, strictly
Tip 3: Put some achievements, like you got a good rank in a coding contest, to help you stand out
It was in the morning time at 9 am



Input: 'n' = 3, 'k' = 2 and 'arr' = {1, 2, 3}
Output: 2
Explanation: The maximum possible minimum distance will be 2 when 2 cows are placed at positions {1, 3}. Here distance between cows is 2.
Follow the steps to solve the problem:
Apply a binary search between 1 and the maximum element of the array.
Each time find the middle element of the search space.
If that middle element can be a possible minimum distance store it as a possibility until we find a better answer, then move in the right direction in the search space.
Else, we will move left in our search space.
When the binary search is complete, return the answer.


Input: 'N' = 2, ‘MAT’ = [[1, 2], [5, 6]]
Output: 1 2 6 5
So the first row will be printed as it is and the second row will be printed in reverse order.



1. Each wheel has 10 slots: ‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ’9’.
2. The wheels can rotate freely and wrap around, ‘9’ can be left rotated to ‘8’ and right rotated to ‘0’, similarly ‘0’ can be right rotated to ‘1’ and left rotated to ‘9’. Rotation of one wheel counts to one rotation.
3. Initially, the lock starts at “0000”, a string representing the state of four wheels.
For a single ring we can rotate it in any of two direction forward or backward as:
0->1->2….->9->0
9->8->….0->9
But we are concerned with minimum number of rotation required so we should choose min (abs(a-b), 10-abs(a-b)) as a-b denotes the number of forward rotation and 10-abs(a-b) denotes the number of backward rotation for a ring to rotate from a to b. Further we have to find minimum number for each ring that is for each digit. So starting from right most digit we can easily the find minimum number of rotation required for each ring and end up at left most digit.
It was at the morning time at 9 am
The interviewer introduced himself and asked me the same.
He asked about my work experience of internship.
He asked me to explain the solutions of the online round questions.
What is kenral
What is mutex , thread , locks
Asked about sparse matrix and how to make it efficient



Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

In the given input, the number of vertices is 4, and the number of edges is 5.
In the input, following the number of vertices and edges, three numbers are given. The first number denotes node ‘X’, the second number denotes node ‘Y’ and the third number denotes the distance between node ‘X’ and ‘Y’.
As per the input, there is an edge between node 0 and node 1 and the distance between them is 5.
The vertices 0 and 2 have an edge between them and the distance between them is 8.
The vertices 1 and 2 have an edge between them and the distance between them is 9.
The vertices 1 and 3 have an edge between them and the distance between them is 2.
The vertices 2 and 3 have an edge between them and the distance between them is 6.
1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.
2. There can be parallel edges i.e. two vertices can be directly connected by more than 1 edge.
Was not able to solve it inefficient time as I was doing it with the help of bfs

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you create a function in JavaScript?