Tip 1 : Code as many as questions as you can if you have time, even if you think you know the answer.
Tip 2 : Know the projects which you mention.
Tip 1 : Have 1-2 programming projects on resume.
Tip 2 : Know about the projects in detail (not necessarily in deep).
sum of opposite coordinate is same. So in a parallelogram ABCD, A+C = B+D (A, B, C, D denote the position vectors)
Did not get full marks in it.
Used DP[idx][weight1][weight2] where this denotes that we are on bag number idx and we can have weight1 more weight in knapsack 1 and weight2 more weight in knapsack 2. Now the transition is just like normal knapsack.
Explained the approach like above, it is a implementation based problem. Interviewer didn't ask for whole code.
1. Push(num): Push the given number in the stack.
2. Pop: Remove and return the top ele...
Told him I knew the question already so he switched to the next question.
I told the solution same as in the above URL.
I had done this question on interview bit already so used the same approach.
I also had done this question on interview bit already so used the same approach.