Brain Teasers Interview Questions
- 1of 5 votes
AnswersThis was the question of two buckets of 3 and 5 litres each. Now measure four litre. I had given 2 solutions but still he wanted 3 solution.
- Nikhil June 11, 2013 in United States for any
1st soln: fill 3 litre and then interchange in various ways to get 4 litre.
2nd soln: fill 5 litre and then interchange in various ways.
do you have any soln other than this.| Report Duplicate | Flag | PURGE
Samsung Developer Program Engineer Financial Software Developer Brain Teasers - -5of 7 votes
Answersneed to implement a weather report functionality. user will provide the city name , need to return the weather report.
- gopi.komanduri May 29, 2013 in India
if weather station exists n functioning properly , will return the weather report of that station .
else ,
will return the nearest available weather station report.
interviewer looking for optimized manner.
looking for datastructures to stores the cities n algo to return the report.| Report Duplicate | Flag | PURGE
Mentor Graphics Analyst Algorithm Arrays Bit Manipulation Brain Teasers C C# C++ Cache Coding Computer Architecture & Low Level Data Mining Data Structures Dynamic Programming General Questions and Comments Graphics Hash Table Ideas Linked Lists Math & Computation Object Oriented Design Problem Solving Sets Sorting Stacks String Manipulation Terminology & Trivia Threads Trees and Graphs XML - 1of 1 vote
Answersyou have a set of integers between 1 .. n in a random order with one of the numbers being repeated. find the best possible way (time and space) to obtain the repeating number.
- VJ May 06, 2013 in India| Report Duplicate | Flag | PURGE
VMWare Inc Member Technical Staff Brain Teasers - 1of 1 vote
Answers4 men- each can cross a bridge in 1,3, 7, and 10 min.
- Abhinav April 27, 2013 in United States for MS office
Only 2 people can walk the bridge at a time. How many min. minutes would they take to cross the bridge.| Report Duplicate | Flag | PURGE
Microsoft SDE1 Brain Teasers - 0of 0 votes
AnswersYou are given a set of 8 balls, all of them identical in appearance and weight, except for one which is slightly heavier than the rest. You are also given a scale with no units, which can only tell you if one load is heavier than the other (think a scale-of-justice type scale). How can you find the heavy ball with only two comparisons? You may place as many balls as you wish on either side of the scale for each comparison.
- DJ April 24, 2013 in United States| Report Duplicate | Flag | PURGE
Software Engineer / Developer Brain Teasers - -1of 1 vote
AnswersThere are 10 balls .Determine the faulty ball in minimum steps
- zammer April 06, 2013 in India for NA| Report Duplicate | Flag | PURGE
Blue Jeans Software Engineer in Test Brain Teasers - 0of 0 votes
AnswersAlice and Bob are playing a game. The game is played as follows :
- sam March 22, 2013 in India
- There are N piles of coins on the table. Pile i has A[i] coins.
- In each turn, each player can pick up 1 or more coins from the leftmost non-empty pile.
- If a player picks up a coin from pile i , all coins from piles 0 to i-1 should have been taken.
- The person who picks up the last coin loses the game.
Alice and Bob play the game alternately. Alice plays first. Given the number of piles N and the
number of coins Ai in pile i, you have to determine which player will win the game, assuming
both play optimally.| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer Brain Teasers - 0of 0 votes
Answers5. There Are N Coins On A Table. There Are Two Players A&B. You Can Take 1 Or 2 Coins At A Time. The Person Who Takes The Last Coin Is The Loser. A Always Starts First.
- Abhijit March 21, 2013 in India
1. If N=7, Then
A) A Can Always Win By Taking Two Coins In His First Chance.
B) B Can Win Only If A Takes Two Coins In His First Chance.
C) B Can Always Win By Proper Play.
D) None of the Above.
2. A Can Win By Proper Play If N Is Equal To
A) 13 B) 37 C) 22 D) 34 E) 48
3. B Can Win By Proper Play If N Is Equal To
A) 25 B) 26 C) 32 D) 41 E) None
4. If N<4, Can A Win by Proper Play Always?Answer: Yes.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersDesign a Tic Tac Toe Game. Classes Segregation and Code Flow.
- hprem991 March 18, 2013 in India| Report Duplicate | Flag | PURGE
StartUp Amazon Software Architect Software Engineer / Developer Algorithm Android Application / UI Design Arrays Assembly Automata Behavioral Bit Manipulation Brain Teasers C C++ Object Oriented Design - 0of 0 votes
AnswersThere are five 10 monster As on the left of the road and 10 monster Bs on the right of the road, the road is with length 21 with a empty slot in the middle. Both A and B can jump over the other type or move forward to a empty slot but cannot move backward.
- J.Jolam March 13, 2013 in United States
for example(* means the empty slot), the following movement are allowed:
AA*BB --> AAB*B
AAB*B --> A*BAB
the following movement is not allowed:
AAB*B --> AA*BB
Question:
What is the least number of steps to let them go through the road.| Report Duplicate | Flag | PURGE
Brain Teasers - 0of 0 votes
AnswersGiven the matrix
21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13
the coordinate of 1 is (0, 0), of 2 is (1, 0), of 17 is (-2, -2).
- J.Jolam March 13, 2013 in China
Question:
1) what is the number in the matrix given (x, y);
2) what is the function n(x, y).| Report Duplicate | Flag | PURGE
Brain Teasers - 0of 2 votes
AnswersWe Have 5 balls And We have to find it out in 2 ways that which 1 is havier or lesser..
- jain.saurabh241990 February 27, 2013 in India for FRESHER| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Brain Teasers - 0of 0 votes
AnswersYou have a cake and you have a knife,you have to cut(straight) cake into 8 parts by using knife 3 times,
- muhammad.husnain.ashraf February 05, 2013 in pakistan
for example cutting cake horizontally and vertically from middle you had make cake in 4 parts by using 2 times knife| Report Duplicate | Flag | PURGE
Techlogix TATA Consultancy Services Software Engineer / Developer Consultant Brain Teasers - 0of 0 votes
Answers: Implement a circular queue of integers of user-specified size using a simple array. Provide routines to initialize(), enqueue() and dequeue() the queue. Make it thread safe. Please implement this with your own code and do not use any class libraries or library calls.
- mr.Deepak.Jakhwal January 27, 2013 in India| Report Duplicate | Flag | PURGE
Quality Assurance Engineer Brain Teasers - 0of 2 votes
AnswersA log file which has user details(user ID,timestamp) and pages visited in a particular day by that user.The next day -the same kind of log file gets generated.How do you find the probability of users who logged in consecutive days out of the second day - logged in users? The question is simple,but they look for the efficient data structure and time complexity.
- sriramMS December 20, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Application / UI Design Arrays Assembly Automata Behavioral Bit Manipulation Brain Teasers C C# C++ Cache Coding Data Mining Data Structures - 0of 0 votes
AnswersWrite a function to calculate the difference between the sum of all nodes' value at even and level of a Tree.
- Fresh_man December 08, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Brain Teasers - 1of 1 vote
AnswersThere are two gates , one to hell and the other to heaven.
- Buzz Lightyear November 22, 2012 in India
Two gatekeepers , one for each gate.
One of them always speaks the truth and the other always lies but you don't know which one s guarding which gate.
You are allowed only one question and you need to find out the gate to heaven.
What is the question you will ask and remember , you do not know which one speaks the truth and which one lies.| Report Duplicate | Flag | PURGE
Brain Teasers - 0of 0 votes
AnswersThere are 3 person in a forest, when they slept at night someone from outside colored their faces black(all three). Now when they wake up in the morning all three started laughing at each other thinking that the other two persons have black faces.
- explorer.bit November 16, 2012 in India
But after some time they realized that their own faces are also black and then they stop laughing at each other.
Here, you have to give a valid LOGICAL REASON that how they realized that their own faces are also black, i.e. all three faces are black.
.
.
To mention here, these are not logical reasons... e.g.
1. They are looking on faces of each other so the other person will realize that his face is also black.
2. One will look into others eyes(eyes as mirror) hence he can find that his face is black.
3. He will use water to see his face if something wrong, hence he will find that his face is black.
4. They will tell each other that your face is black. ..... e.t.c
.
.
ALL THE BEST to all for this question.| Report Duplicate | Flag | PURGE
Sapient Corporation Associate Brain Teasers - 0of 0 votes
AnswersYou are given 2 fair dices, whose all 6 faces are blank. You have to fill these faces with 0-9(you can repeat some digits, as there are 12 faces) such that, you should be able to produce all the dates of an English month.
- explorer.bit November 14, 2012 in India
e.g. you should be able to show 01 02 ....09 10.....30 31| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Brain Teasers - 1of 1 vote
AnswersFind the angle between minute and hour hand when time is 6:50 am
- crystal.rishi2 October 23, 2012 in India| Report Duplicate | Flag | PURGE
Kalido Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersYou have 8 identical balls and a weighing pan. One of the balls is fake. But you don't know whether it is heavy or light. Minimize the number of weighings
- crystal.rishi2 October 23, 2012 in India| Report Duplicate | Flag | PURGE
Kalido Software Engineer / Developer Brain Teasers - 0of 2 votes
AnswersDivide a triangle into 5 triangles of equal area
- crystal.rishi2 October 23, 2012 in India| Report Duplicate | Flag | PURGE
Kalido Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersThere is a boat on the water. There is a rock in it. At this time, assume the level of the water is L1. Now say, you threw the rock into the water and it reached the bottom. Now what will be the level of the water?
- endless October 16, 2012 in United States| Report Duplicate | Flag | PURGE
Bank of America Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersGiven a 2-D array of 8x8 size. Each element contains a randomly generated integer > 0. You need to choose a 3x3 matrix from that. Now an algorithm randomly picks up one element from that matrix.
- endless September 23, 2012 in United States
1) How will you maximize your chances of picking up the highest number?
2) Assume two players. Player1 selected a 3x3 matrix. Now after seeing that, how can Player2 choose a 3x3 matrix to maximize his chances of winning?| Report Duplicate | Flag | PURGE
Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersThe aim is to find the optimal solution which packs the pieces in 4x4 unit square.
- jaipster September 14, 2012 in India for SDE
a jig saw puzzle is made up of exactly 4 pieces.
size of the completed puzzle is always 4 units x 4 units. This is given
There is no picture printed on the pieces; any solution would be valid, as long it is a 4 x 4 unit square.
The pieces can be only triangles, or quadrilaterals. Nothing else.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Algorithm Brain Teasers Coding Dynamic Programming - 0of 0 votes
AnswersYou have eight balls all of the same size. 6 of them weigh the same, and two of them weighs slightly more. How can you find the balls that is heavier by using a balance and do this in minimum number of steps?
- Mahesh September 05, 2012 in India| Report Duplicate | Flag | PURGE
Gluster Applications Developer Brain Teasers - 0of 0 votes
AnswersJust Example : "Given 8 cue balls , one is weighing lesser than other 7. Find that(light weight) ball using just 2 chances on balance weight."
- Psycho September 04, 2012 in India
How to find a general solution to these kind of question? How to divide this set of balls? Is there any finer method or general formula?| Report Duplicate | Flag | PURGE
Software Engineer / Developer Brain Teasers - 0of 0 votes
Answersif you draw chords at random in a circle what fraction of hem will be shorter than chords formed by an inscribed equilateral triangle?
- roseshah56@yahoo.com August 30, 2012 in United States| Report Duplicate | Flag | PURGE
Brain Teasers - 0of 0 votes
AnswersWhat is the probability of being the answer correct for this question, when the answer is chosen randomly:
- HS August 25, 2012 in India
a. 0.25
b. 0.60
c. 0.25
d. 0.50| Report Duplicate | Flag | PURGE
Brain Teasers - -1of 1 vote
Answersif apple is for 40 cents, banana is for 60 cents and grapefruit is for 80 cents then what pear is for???
- thinker August 20, 2012 in India| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Brain Teasers