Tip 1 : Be thorough with all the standard data structures and algorithms.
Tip 2 : Give contests regularly on codeforces/codechef.
Tip 3 : Practise famous interview problems from past.
Tip 1 : Only mention the projects which you can properly explain to the interviewer.
Tip 2 : Elaborate the work done by you in bullet points.
Tip 3 : Try to keep the resume exactly 1 page long.
We had to solve 2 coding problems in 60 minutes. It was held in afternoon on hackerearth platform.



If āNā = 4 and āMā = 5, and the matrix is:
0 1 0 1 1
0 1 0 1 0
0 1 0 1 1
0 1 0 1 1
Then clearly, the submatrix containing all the elements of the first four columns contains has equal number of 0ās and 1ās, the area of this submatrix is equal to 4 * 4 = 16, therefore we will print 16.
Try to solve it in less than O( N^2 * M^2 ) time complexity.



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.
This was the first coding interview round. It was held in morning. The interviewer gave his introduction and asked me to introduce myself. After this he quickly described the problem statement. I asked some questions related to the problem to ensure that i fully understand the statement and then proceded with my solution. The round lasted for close to 45 minutes and in that time i was able to satisfy the interviewer with my solution. The interviewer was very helpful.
We are given some inequalities like a > b or c < d, some of the inequalites are between two variables and some are between one variable and one constant number, find if all the inequalities can hold true simultaneously or not.
1. Corresponding to each inequality, i created a directed edge, for example if there is some inequality like a < b, then i create an edge starting from a and ending at b.
2. Then i created edges between all the integers in ascending order. For example if integers 1, 2 and 3 were appearing in some inequalities, then i created an edge between 1 and 2 and another between 2 and 3.
3. I searched for a cycle, if there exists one then it means that the inequalities can't hold true simultaneously else they can hold true.
This was the second and final coding interview round. It was held in the afternoon almost 90 minutes after my first round. The interviewer introduced himself and i also gave my brief intro, then without wasting time he moved to the problem statement. I was able to solve the problem and code my solution when almost 10 minutes were still remaining. To utilise the remaining time, the interviewer added a few more conditions to the problem and asked me that how could i modify my solution wrt to the new conditions, we had a very casual discussion regarding this for almost 10 minutes.




Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?