Sie sind auf Seite 1von 1

Given an array of size n wherein elements keep on increasing monotically upto a

certain location
after which they keep on decreasing monotically, then again keep on increasing,
then decreasing
again and so on. Sort the array in place (ie. using only O(1) extra memory).

You are given a lot of cuboid boxes with different length, breadth and height. Y
ou need to find the maximum subset which can fit into each other.
For example:
If Box A has LBH as 7 8 9
If Box B has LBH as 5 6 8
If Box C has LBH as 5 8 7
If Box D has LBH as 4 4 4
then answer is A,B,D
A box can fit into another only and only if all dimensions of that is less than
the bigger box. Also Rotation of boxes is not possible.
You are given four no 1,2,3,4. The score to start is zero.
There are two people. Each one has to choose one of 1,2,3,4 alternatively and ad
d to score. The person who reaches the score value N (variable given as input) 1
st will won.
What will be your strategy.

Das könnte Ihnen auch gefallen