Kate, Demi, Madona, Sharon, Britney and Nicole decided to
lunch together in a restaurant. The waiter led them to a
round table with six chairs.
How many different ways can they seat?
An anthropologist discovers an isolated tribe whose written
alphabet contains only six letters (call the letters A, B,
C, D, E and F). The tribe has a taboo against using the same
letter twice in the same word. It's never done.
If each different sequence of letters constitues a different
word in the language, what is the maximum number of
six-letter words that the language can employ?
If you were to dial any 7 digits on a telephone in random
order, what is the probability that you will dial your own
phone number?
Assume that your telephone number is 7-digits.
At University of Probability, there are 375 freshmen, 293
sophomores, 187 juniors, & 126 seniors. One student will
randomly be chosen to receive an award.
What percent chance is there that it will be a junior? Round
to the nearest whole percent
There are 4 mugs placed upturned on the table. Each mug have
the same number of marbles and a statement about the number
of marbles in it. The statements are: Two or Three, One or
Four, Three or One, One or Two.
Only one of the statement is correct. How many marbles are
there under each mug?
A 3 digit number is such that it's unit digit is equal to
the product of the other two digits which are prime. Also,
the difference between it's reverse and itself is 396.
What is the sum of the three digits?
Difference between Bholu's and Molu's age is 2 years and the
difference between Molu's and Kolu's age is 5 years.
What is the maximum possible value of the sum of the
difference in their ages, taken two at a time?
What is the four-digit number in which the first digit is
1/3 of the second, the third is the sum of the first and
second, and the last is three times the second?
There is a 50m long army platoon marching ahead. The last
person in the platoon wants to give a letter to the first
person leading the platoon. So while the platoon is marching
he runs ahead, reaches the first person and hands over the
letter to him and without stopping he runs and comes back to
his original position.
In the mean time the whole platoon has moved ahead by 50m.
The question is how much distance did the last person cover
in that time. Assuming that he ran the whole distance with
uniform speed.
There are 3 persons X, Y and Z. On some day, X lent
tractors to Y and Z as many as they had. After a month Y
gave as many tractors to X and Z as many as they have.
After a month Z did the same thing. At the end of this
transaction each one of them had 24.
Find the tractors each originally had?
In a hotel, rooms are numbered from 101 to 550. A room is
chosen at random. What is the probability that room number
starts with 1, 2 or 3 and ends with 4, 5 or 6?
One of the four people - Mr. Clinton, his wife Monika,
their son Mandy and their daughter Cindy - is a singer and
another is a dancer. Mr. Clinton is older than his wife and
Mady is older than his sister.
1. If the singer and the dancer are the same sex, then
the dancer is older than the singer.
2. If neither the singer nor the dancer is the parent
of the other, then the singer is older than the dancer.
3. If the singer is a man, then the singer and the
dancer are the same age.
4. If the singer and the dancer are of opposite sex
then the man is older than the woman.
5. If the dancer is a woman, then the dancer is older
than the singer.
Whose occupation do you know? And what is his/her
occupation?
Two identical pack of cards A and B are shuffled
thoroughly. One card is picked from A and shuffled with B.
The top card from pack A is turned up. If this is the Queen
of Hearts, what are the chances that the top card in B will
be the King of Hearts?
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
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