A person is standing at the top of a 100mt building, he has
a rope 75mts long and the only way he can come down is
through the rope. He can cut the rope also he can tie the
rope at any point on the building, but he cant jump and
ofcourse dont even think about the stairs :D Find out the
best way he'll come down.
3 boys go to the restaurant. Their bill was 75 rs..
So they contributed 25 each. Manager then gives 5 rs back
to the waiter and then waiter gave 3 rs back to them and
put 2 rs into his pocket..
So their actual contribution is 24 because they got 1-1 rs
back. so 24*3=72 and 2 rs into the waiter's pocket. so
74+2=74
where is 1 rs?
In a college, the science department has three disciplines.
In total, 280 students study chemistry, 254 students study
physics and 280 students study biology. 97 students study
both chemistry and physics, 138 students study both physics
and biology, 152 students study both chemistry and biology.
73 students study all three disciplines. Can you determine
how many students there are in the science department?
There are 25 horses and only five tracks in a race.
How do you find the second coming horse of all the 25
horses, provided there is no stop clock? (obviously, a
horse cannot participate more than once in a race).
I am the owner of a pet store. If I put in one canary per
cage, I have one bird too many. If I put in two canaries
per cage, I have one cage too many. How many cages and
canaries do I have? (Expalin in Detail)
a.4 canaries and 3 cages
b.3 canaries and 4 cages
c.4 canaries and 5 cages
d.None of the above
You have 2 identical glass bulbs with you. Bulb
manufacturer has mentioned that each bulb might withstand a
drop of 200 Feet at maximum. Your task is to find the
height at which the bulb breaks ofcourse with minimum
number of iterations.
Assume that you have 200 blocks of 1 foot each which can be
stacked one by one to create a 200 Feet structure to carry
out the test.
When a bottle full of honey was weighed, its weight was 1
kilogram. When the bottle was weighed with half the honey,
its weight was 600 grams. What is the weight of the bottle?
can anyone provide the answer for the puzzle below
There are 25 horses,in each race only 5 horses can
participate.how many races are required to select best 5
horses out of 25.
need answer with detailed explanation
Given a sequence of integers, there are a few sequences
which result in balanced
binary search trees i.e., AVL trees. Write a program that
takes a sequence of integers
as input and outputs the number of such sequences that
result in the balanced binary
search trees.
Input Format:
Single line contains sequence of integers terminated by -1.
Output format:
Print the number of AVL tree possible from that input sequence.
Sample Input:
1 2 3 -1
Sample Output:
2
Given an N × N array of positive and negative integers, find
the sub-rectangle with
the largest sum. The sum of a rectangle is the sum of all
the elements in that rectangle.
In this problem the sub-rectangle with the largest sum is
referred to as the maximal
sub-rectangle. A sub-rectangle is any contiguous sub-array
of size 1 × 1 or greater
located within the whole array.
Input Format:
First line contains the size of matrix.
Followed by n lines and each line contain n integers
separated by space.
Output format:
Single integer which represents maximum sum of rectangle.
Sample Input:
4
0 -2 -7 0
9 2 -6 2
-4 1 -4 1
-1 8 0 -2
Sample Output:
15