A,B,C,D are four teams.Three guys x,y,z comment about
matches between four teams ,
X said either A or B will win
Y says A will never win
Z says C or B will not win
only one of them is correct then who won the match.
Question asked in Infosys Campus Recruitment Held at
Pragathi.
On an iceland few customs are there .Men always speak
truth, no women tells consecutive truth or false i.e. If
first statement is true ,second is false and vice versa.
same with children also.
There was a family couple and a child. A passenger asked
the child ?are you a boy or a girl? the boy spoke german.
one of the parent said ? he is a boy? the other said ?he
is a girl? ?he is lying?.
(i)The kid is boy or girl
(ii)who spoke the first mother/father
A cube painted on all six sides by red color is divided
into 125 equal cubes find
i) number of cubes having
a)3 faces colored
b)2 faces colored
c) 1 face colored
d)0 faces colored
ii)Find probability of picking a cube having red face
A man went into a fast food restaurant and ate a meal
costing Rs. 105, giving the accountant a Rs. 500 note. He
kept the change, came back a few minutes later and had some
food packed for his girl friend. He gave the accountant a
Rs. 100 note and received Rs. 20 in change. Later the bank
told the accountant that both the Rs. 500 and the Rs. 100
notes were counterfeit.
How much money did the restaurant lose? Ignore the profit of
the food restaurant.
There is a family party consisting of two fathers, two
mothers, two sons, one father-in-law, one mother-in-law, one
daughter-in-law, one grandfather, one grandmother and one
grandson.
What is the minimum number of persons required so that this
is possible?
Ali Baba had four sons, to whom he bequeathed his 39 camels,
with the proviso that the legacy be divided in the following
way :
The oldest son was to receive one half the property, the
next a quarter, the third an eighth and the youngest one
tenth. The four brothers were at a loss as how to divide the
inheritance among themselves without cutting up a camel,
until a stranger appeared upon the scene.
Dismounting from his camel, he asked if he might help, for
he knew just what to do. The brothers gratefully accepted
his offer.
Adding his own camel to Ali Baba's 39, he divided the 40 as
per the will. The oldest son received 20, the next 10, the
third 5 and the youngest 4. One camel remained : this was
his, which he mounted and rode away.
Scratching their heads in amazement, they started
calculating. The oldest thought : is not 20 greater than the
half of 39? Someone must have received less than his proper
share ! But each brother discovered that he had received
more than his due. How is it possible?
At what time immediately prior to Six O'clock the hands of
the clock are exactly opposite to each other. Give the exact
time in hours, minutes and seconds.
On evey Sunday Amar, Akbar and Anthony lunch together at
Preetam-Da-Dhaba where they order lassi based on following
facts.
1. Unless neither Amar nor Akbar have lassi, Anthony must
have it.
2. If Amar does not have lassi, either Akbar or Anthony or
both have it.
3. Anthony has lassi only if either Amar or Akbar or both
have it.
4. Akbar and Anthony never have lassi together.
Who order(s) lassi?
There are 10 statements written on a piece of paper:
1. At least one of statements 9 and 10 is true.
2. This either is the first true or the first false statement.
3. There are three consecutive statements, which are false.
4. The difference between the numbers of the last true and
the first true statement divides the number, that is to be
found.
5. The sum of the numbers of the true statements is the
number, that is to be found.
6. This is not the last true statement.
7. The number of each true statement divides the number,
that is to be found.
8. The number that is to be found is the percentage of true
statements.
9. The number of divisors of the number, that is to be
found, (apart from 1 and itself) is greater than the sum of
the numbers of the true statements.
10. There are no three consecutive true statements.
Find the minimal possible number?
The cricket match between India and Pakistan was over.
? Harbhajan scored more runs than Ganguly.
? Sachin scored more runs than Laxman but less than Dravid
? Badani scored as much runs as Agarkar but less than Dravid
and more than Sachin.
? Ganguly scored more runs than either Agarkar or Dravid.
Each batsman scored 10 runs more than his immediate batsman.
The lowest score was 10 runs. How much did each one of them
score
A boy found that he had a 48 inch strip of paper. He could
cut an inch off every second.
How long would it take for him to cut 48 pieces? He can not
fold the strip and also, can not stack two or more strips
and cut them together.
Tanya wants to go on a date and prefers her date to be tall,
dark and handsome.
1. Of the preferred traits - tall, dark and handsome - no
two of Adam, Bond, Cruz and Dumbo have the same number.
2. Only Adam or Dumbo is tall and fair.
3. Only Bond or Cruz is short and handsome.
4. Adam and Cruz are either both tall or both short.
5. Bond and Dumbo are either both dark or both fair.
Who is Tanya's date?
Because cigars cannot be entirely smoked, a Bobo who
collects cigar butts can make a cigar to smoke out of every
3 butts that he finds.
Today, he has collected 27 cigar butts. How many cigars will
he be able to smoke?
A contractor had employed 100 labourers for a flyover
construction task. He did not allow any woman to work
without her husband. Also, atleast half the men working came
with their wives.
He paid five rupees per day to each man, four ruppes to each
woman and one rupee to each child. He gave out 200 rupees
every evening.
How many men, women and children were working with the
constructor?
The letters P, Q, R, S, T, U and V, not necessarily in that
order represents seven consecutive integers from 22 to 33.
? U is as much less than Q as R is greater than S.
? V is greater than U.
? Q is the middle term.
? P is 3 greater than S.
Can you find the sequence of letters from the lowest value
to the highest value?
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