Tip 1 - Practice Atleast 250 Questions
Tip 2 - Ex- Do atleast 2 projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
5 Coding Questions and few mcq



The idea is to take every interval one by one and find the number of intervals that overlap with it. Keep track of the maximum number of intervals that overlap with an interval. Finally, return the maximum value.
Follow the steps mentioned below:
Run two nested loops, the outer loop from start to end and the inner loop from i+1 to end.
For every iteration of the outer loop, find the count of intervals that intersect with the current interval.
Update the answer with the maximum count of overlap in each iteration of the outer loop.
Print the answer.



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
An element of the array can store water if there are higher bars on the left and right. The amount of water to be stored in every element can be found out by finding the heights of bars on the left and right sides. The idea is to compute the amount of water that can be stored in every element of the array.



You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.



'N' = 5, 'ARR' = [1, 2, 3, 2, 3]
Output: 1
Except for number 1, all numbers occur an even number of times.
Calculate the sum of first n natural numbers as sumtotal= n*(n+1)/2
Create a variable sum to store the sum of array elements.
Traverse the array from start to end.
Update the value of sum as sum = sum + array[i]
Print the missing number as sumtotal - sum



An Efficient Solution is to use hashing.
1) Traverse array and insert elements and their counts in hash table.
2) Traverse array again and print first element with count equals to 1.
It is based on Data structures and OOPS concepts . Projects was discussed in this round



See, here each coin of a given denomination can come an infinite number of times. (Repetition allowed), this is what we call UNBOUNDED KNAPSACK. We have 2 choices for a coin of a particular denomination, either i) to include, or ii) to exclude. But here, the inclusion process is not for just once; we can include any denomination any number of times until N<0.
Basically, If we are at s[m-1], we can take as many instances of that coin ( unbounded inclusion ) i.e count(S, m, n - S[m-1] ) ; then we move to s[m-2]. After moving to s[m-2], we can't move back and can't make choices for s[m-1] i.e count(S, m-1, n ).
Finally, as we have to find the total number of ways, so we will add these 2 possible choices, i.e count(S, m, n - S[m-1] ) + count(S, m-1, n ) ; which will be our required answer.

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?