Five friends with surname Batliwala, Pocketwala, Talawala,
Chunawala and Natakwala have their first name and middle
name as follow.
1. Four of them have a first and middle name of Paresh.
2. Three of them have a first and middle name of Kamlesh.
3. Two of them have a first and middle name of Naresh.
4. One of them have a first and middle name of Elesh.
5. Pocketwala and Talawala, either both are named Kamlesh or
neither is named Kamlesh.
6. Either Batliwala and Pocketwala both are named Naresh or
Talawala and Chunawala both are named Naresh.
7. Chunawala and Natakwala are not both named Paresh.
Who is named Elesh?
Amit, Bhavin, Himanshu and Rakesh are sitting around a table.
? The Electonics Engineer is sitting to the left of the
Mechanical Engineer.
? Amit is sitting opposite to Computer Engineer.
? Himanshu likes to play Computer Games.
? Bhavin is sitting to the right of the Chemical Engineer.
Can you figure out everyone's profession?
Tic-Tac-Toe is being played. One 'X' has been placed in one
of the corners. No 'O' has been
placed yet.
Where does the player that is playing 'O' has to put his
first 'O' so that 'X' doesn't win?
Assume that both players are very intelligent. Explain your
answer
There are four groups of Mangoes, Apples and Bananas as
follows:
Group I : 1 Mango, 1 Apples and 1 Banana
Group II : 1 Mango, 5 Apples and 7 Bananas
Group III : 1 Mango, 7 Apples and 10 Bananas
Group IV : 9 Mango, 23 Apples and 30 Bananas
Group II costs Rs 300 and Group III costs Rs 390.
Can you tell how much does Group I and Group IV cost?
In the town called Alibaug, the following facts are true:
? No two inhabitants have exactly the same number of hairs.
? No inhabitants has exactly 2025 hairs.
? There are more inhabitants than there are hairs on the
head of any one inhabitants.
What is the largest possible number of the inhabitants of
Alibaug?
In the middle of the confounded desert, there is the lost
city of "Ash". To reach it, I will have to travel overland
by foot from the coast. On a trek like this, each person can
only carry enough rations for five days and the farthest we
can travel in one day is 30 miles. Also, the city is 120
miles from the starting point.
What I am trying to figure out is the fewest number of
persons, including myself, that I will need in our Group so
that I can reach the city, stay overnight, and then return
to the coast without running out of supplies.
How many persons (including myself) will I need to
accomplish this mission?
A blindfolded man is asked to sit in the front of a carrom
board. The holes of the board are shut with lids in random
order, i.e. any number of all the four holes can be shut or
open.
Now the man is supposed to touch any two holes at a time and
can do the following.
? Open the closed hole.
? Close the open hole.
? Let the hole be as it is.
After he has done it, the carrom board is rotated and again
brought to some position. The man is again not aware of what
are the holes which are open or closed.
How many minimum number of turns does the blindfolded man
require to either open all the holes or close all the holes?
Note that whenever all the holes are either open or close,
there will be an alarm so that the blindfolded man will know
that he has won.
One side of the bottom layer of a triangular pyramid has 12
balls. How many are there in the whole pyramid?
Note that the pyramid is equilateral and solid.
There is a shortage of tubelights, bulbs and fans in a
village - Kharghar. It is found that
? All houses do not have either tubelight or bulb or fan.
? exactly 19% of houses do not have just one of these.
? atleast 67% of houses do not have tubelights.
? atleast 83% of houses do not have bulbs.
? atleast 73% of houses do not have fans.
What percentage of houses do not have tubelight, bulb and fan?
At the Party:
1. There were 9 men and children.
2. There were 2 more women than children.
3. The number of different man-woman couples possible was
24. Note that if there were 7 men and 5 women, then there
would have been 35 man-woman couples possible.
Also, of the three groups - men, women and children - at the
party:
4. There were 4 of one group.
5. There were 6 of one group.
6. There were 8 of one group.
Exactly one of the above 6 statements is false.
Can you tell which one is false? Also, how many men, women
and children are there at the party?
500 men are arranged in an array of 10 rows and 50 columns
according to their heights.
Tallest among each row of all are asked to come out. And the
shortest among them is A.
Similarly after resuming them to their original positions,
the shortest among each column are asked to come out. And
the tallest among them is B.
Now who is taller A or B ?
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