Tip 1 - Practice at least 250 Questions from coding ninjas
Tip 2 - Do some good projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume and be confident.
There were 3 questions to be solved on hackerrank in 90 minutes.24 students were selected based on this round. Need not solve all the problems completely to get selected as hackerrank gives partial marking even if some testcases are not running in a problem.


Two subarrays are distinct when they have at least one different element.
If ARR = [3,2,3], and K = 1
then there are 4 subarrays with at most K odd elements:
[3], [3,2], [2,3],[2]



arr=[3,4,5]
subsets ={3}, {3,4}, {3,4,5}, {3,5}, {4}, {4,5}, {5}



If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.
The interviewer made it clear in the start that he is going to ask 2 questions and I have 30 minutes to solve both the questions.The interviewer asked me to tell him what I am thinking and was giving hints based on that. 17 were selected after this round.



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
consider every bracket and recursively count number of reversals by taking two cases (i) keeping the bracket as it is (ii) reversing the bracket. If we get a balanced expression, we update result if number of steps followed for reaching here is smaller than the minimum so far.



A connected component in the map is the maximum subset of cities that are connected i.e we can go from one city to any other in that subset.
The interviewer made it clear in the start that he is going to ask 2 questions and I have 30 minutes to solve both the questions.


1. A balanced binary tree is a binary tree structure in which the left and right subtrees of every node differ in height by no more than 1.
2. A binary search tree is a binary tree data structure, with the following properties
a. The left subtree of any node contains nodes with value less than the node’s value.
b. The right subtree of any node contains nodes with values equal to or greater than the node’s value.
c. Right, and left subtrees are also binary search trees.
Below tree, is a balanced binary search tree

Below tree is not a balanced tree as the height of the left subtree and right subtree of node ‘5’ differs by more than 1. Moreover, the tree is also not a BST as node ‘2’ is less than node ‘3’ but ‘2’ is the right child of ‘3’.




If a particular job has a deadline 'x', it means that it needs to be completed at any time before 'x'.
Assume that the start time is 0.
'N' = 3, Jobs = [[1, 1, 30], [2, 3, 40], [3, 2, 10]].
All the jobs have different deadlines. So we can complete all the jobs.
At time 0-1, Job 1 will complete.
At time 1-2, Job 3 will complete.
At time 2-3, Job 2 will complete.
So our answer is [3 80].
Solution is to generate all subsets of a given set of jobs and check individual subsets for the feasibility of jobs in that subset. Keep track of maximum profit among all feasible subsets.
First he asked me about my college life, my passion etc. The we discussed my internships in detail. Late he asked my strength, weakness and what is an ideal company to you?
He gave me to write a code in Java using OOP.
Later asked me advantages of abstraction and interfaces.
Later he asked me questions like if I give you 1 million dollar where and how will you use it?

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?