Tip 1 : Be well prepared for ds algo questions of interviewvector ,atleast 50 questions
Tip 2 : Prepare system design very well.solve problems like Railway booking ,online movie booking problems.
Tip 1 : Keep it short
Tip 2 : Highlight only important project



The idea is to use recursion to solve this problem. For each item, there are two possibilities:
Include the current item in the knapsack and recur for remaining items with knapsack’s decreased capacity. If the capacity becomes negative, do not recur or return -INFINITY.
Exclude the current item from the knapsack and recur for the remaining items.



1. The array can have duplicate elements.
2. Each of the array elements must belong to exactly one of the 'K' subsets.
3. The elements chosen for a subset may not be contiguous in the array.
We can start by calculating the sum of all elements in the set. If the sum is not divisible by k, we can’t divide the array into k subsets with an equal sum. If the sum is divisible by k, check if k subsets with the sum of elements equal to sum/k exists or not. We can find this by considering each item in the given array one by one, and for each item, include it in the i'th subset & recur for the remaining items with the remaining sum. We backtrack if the solution is not found by including a current item in the i'th subset and try for the (i+i)'th subset.
I was asked to design railway booking system.
About myself, why do you want join our company

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?