## Brain Teasers Interview Questions

- 6of 8 votes

AnswersA man goes to a hardware shop and asks for price of an item. The shop keeper replies that the item is "one for $1".

- careercupuser May 19, 2014 in United States

The man gives the shop keeper "$3 for 600". What did the man buy for his newly painted house?| Report Duplicate | Flag | PURGE

Epic Systems Software Engineer / Developer Brain Teasers - 1of 1 vote

AnswersGenerate all Kaprekar Number (refer Wiki for Kaprekar number's definition) from 1 to 999999.

- hulk April 26, 2014 in India

I gave a brute force approach of generating all number in the range and checking if it is Kaprekar or not.| Report Duplicate | Flag | PURGE

Flipkart SDE-2 Algorithm Brain Teasers - 4of 4 votes

AnswersGiven a random generator rand(5) which generates numbers between 0 to 4. How do u generate numbers between 0 to 6, I.e. Implement rand(7).

- hulk April 16, 2014 in India| Report Duplicate | Flag | PURGE

Amazon SDE1 Algorithm Brain Teasers - 0of 0 votes

AnswerUnable to get what exactly the Question Is?

- jsd.learner April 02, 2014 in India

so What is the whole logic behind this question .It seems to be complete Math problem to me.

There is a Grasshopper in a tropical forest. The grasshopper can jump only vertically and horizontally, and the length of jump is always equal to x centimeter. A GRasshopper has found herself at the center of some cell of the chess board of the size pxq centimeters(each cell is 1x1 centimeters). She can jump as she wishes for an arbitrary number of times, she can even visit a cell more than once. the only restriction is that she cannot jump out of the board.

The grasshopper can count the number of cells that she can reach from the starting position(x,y). Let's denote this amount by dx,y. your task is to find the number of such starting position(x,y), which have the maximum possible value of dx,y

Input

The integer array contains three integers p,q,x

p= length of the board

q= width of the board

x=length of the grasshoppers jump.

Output

Output the only integer - the number of the required starting position of the Grasshopper

Example

input 2 3 1000000

output 6

input 3 3 2

output 4

Regards,

JSD| Report Duplicate | Flag | PURGE

Algorithm Brain Teasers Ideas Java Knowledge Based Math & Computation - 1of 7 votes

AnswersGiven an excel column number convert it to excel column alphabet and reverse.

- codechamp March 30, 2014 in India for AWS

Example : If column number(starts from 0) = 26 : Column alpha = AA.| Report Duplicate | Flag | PURGE

Amazon Software Engineer / Developer Algorithm Brain Teasers Data Structures - 0of 0 votes

Answers"How would you find the number of gas stations in the United States?"

- pritabread March 05, 2014 in United States

*You cannot look up any concrete information (like the average number of gas stations per state), but you need to yield an accurate answer.| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - 0of 2 votes

AnswerThey have given some flowchat questions in thought works ... how to solve these questions can anybody explain for all the questions....?

- premnath.velmurugan February 22, 2014 in India

http://placement.freshersworld.com/placement-papers/ThoughtWorks/Placement-Paper-Whole-Testpaper-29732| Report Duplicate | Flag | PURGE

Software Engineer / Developer Brain Teasers - 0of 0 votes

AnswersYou are trying to cook an egg for exactly 15 minutes, but instead of a timer, you are given two

- Deepak Baroliya February 04, 2014 in United States

ropes which burn for exactly 1 hour each. The ropes, however, are of uneven densities – eg,

half the rope length-wise might take only 2 minutes to burn?| Report Duplicate | Flag | PURGE

Brain Teasers - 6of 6 votes

AnswersTwo container of 5 L and 3 L are given. Then are is 9.5L water given you need to make 4L water with minimum attempts and water wastage.

- Sachdefine January 11, 2014 in India for Kindle| Report Duplicate | Flag | PURGE

Amazon Quality Assurance Engineer Brain Teasers - 1of 1 vote

AnswersA Contracter is doing work for 7 days at your home, you need to pay him 7000$ in total. Every day you need to pay him 1000$ only .. To Pay him you have a gold plate wortjh 7000$ , but you can cut it only twice

- juny January 08, 2014 in United States for Traffic| Report Duplicate | Flag | PURGE

Ebay Software Engineer / Developer Brain Teasers - 0of 0 votes

AnswersHow would you structure the game of life (classes, functions etc...)? How would you structure the board if it was played on a sphere?

- rajkobie95 December 14, 2013 in United States| Report Duplicate | Flag | PURGE

Microsoft Applications Developer Brain Teasers - 0of 0 votes

AnswersFind the degree of separation between two people (e.g. LinkedIn's connected feature)

- rajkobie95 December 14, 2013 in United States| Report Duplicate | Flag | PURGE

Microsoft Applications Developer Brain Teasers - 0of 0 votes

AnswersA subscriber is allowed to make a certain number of telephone calls for a lumpsum charge of Rs.300. Beyond that, he is charged at a certain rate per call. Two subscribers together make 1400 calls, and were charged Rs.425 and Rs.925 respectively. If a single person had made all of the 1400 calls he would have been charged Rs.1550. How many telephone calls are allowed for the first Rs.300?

- PRASHANTGAURAV November 27, 2013 in United States

option

a)300

b) 350

c) 400

d) 450| Report Duplicate | Flag | PURGE

CGI-AMS Software Engineer / Developer Brain Teasers - -4of 4 votes

AnswersWrite a function called FooBar that takes input integer n and prints all the numbers from 1 upto n in a new line. If the number is divisible by 3 then print "Foo", if the number is divisible by 5 then print "Bar" and if the number is divisible by both 3 and 5, print "FooBar". Otherwise just print the number.

- rpisid November 14, 2013 in United States

for example FooBar(15) should print as follows:

1

2

Foo

4

Bar

Foo

7

8

Foo

Bar

11

Foo

13

14

FooBar

I know, easy right? ;)| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - 3of 3 votes

AnswersYou have three jars filled with candies. One jar is filled with banana candies, one jar is filled with lemon candies and one jar has a mix of both. All the jars are mislabelled (i.e. all the jars have wrong labels about what kind of candies they contain).

- rpisid November 14, 2013 in United States

All the candies look very similar in shape, size and color and they even smell the same. The only way to distinguish them is by tasting.

You have to eat one and only one candy to determine the correct jar labels. You can eat that one candy from any jar you want as long as you eat only one in total.| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - -4of 4 votes

Answersdesign an alarm clock for a deaf person.

- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - 0of 2 votes

Answers3 fruit baskets having apple, orange and mix. all labeled wrong. with only one sample taking from one basket but not peeking find out which basket has which one.

- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - 1of 9 votes

Answers9 identical balls. one ball is heavy. find the heavy ball with only 2 measurements ........ dead easy.

- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE

Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes

AnswersYou have perfect cubical blocks (i.e. each of the blocks has 6 sides)

- rpisid September 29, 2013 in United States

You have to make a calender display using those two cubes. So the task is to display the numbers 1 through 31 using the two cubes. For example you would make the date 13th by writing '1' on one cube and '3' on the other.

Only one digit can be written on each face of both the cubes. So there should be 6 numbers printed on each face of the two cubes.

How would you split and write the numbers on the two cubes such that all the numbers from 1 through 31 are displayed using them?| Report Duplicate | Flag | PURGE

Software Engineer Intern Brain Teasers - 5of 7 votes

AnswersWhat is the minimum representation in bits of two positions on an 8x8 chessboard?

- pretonesio August 28, 2013 in United States for Outlook| Report Duplicate | Flag | PURGE

Microsoft SDE1 Brain Teasers - 3of 3 votes

AnswersThere is a fictional company called fooBar in fooLand. The CEO of fooBar, fooMan, directs all managers to minimize the total hike that they give to employees, while ensuring that the hike is fair to them. Usually, this is done by giving more hike to employees who are rated better. So, for example, if an employee is rated 2 and is given hike 3x, an employee rated 3 should be given a hike greater than 3x. Hikes are always in multiples of x only and the minimum hike to be given to any employee is x.

- poojabasia August 24, 2013 in United States

This year, however, a wicked manager, barMan comes up with a brilliant strategy. He assumes that each employee would get to know the hike of only the two employees who sit next to him (one on the left, one on the right). And therefore, he reasons(using whole of his analytical left brain), that as long as he could make hikes fair for each employee with respect to the two employees that sit next to him, he would fulfill the dual objective of being "fair" as well as minimizing the total hike given. Just for clarification, the employees of each team sit in one big line.

barMan hires you to calculate the hike to be given to each employee. Over to you. You are supposed to come up with the total hike number that will excite barMan and make him roll on the floor laughing. You are given that no two employee sitting next to each other would have a common rating.

Input:

The order of rating of each employee should be in the order in which they sit. First line will be the value of x. The second line will be the number of employees 'n'. The next 'n' lines specify the rating of each employee. Rating can be integers from 1 to 105. (weird, right?)

1 <= n <= 105.

1 <= x <= 104.

Sample input 1:

10

4

1

4

6

2

Output:

70

Why?

If we have the hikes as first employee gets 10, second gets 20, third gets 30 and fourth gets 10, we satisfy all our constraints.| Report Duplicate | Flag | PURGE

Brain Teasers - 0of 0 votes

AnswersHow would you weigh an aeroplane

- tryingtosolvemystery August 06, 2013 in United States| Report Duplicate | Flag | PURGE

Goldman Sachs Financial Software Developer Brain Teasers - 0of 0 votes

AnswersGiven a preorder sequence from a Binary Tree, how many unique trees can be created from this? (They want a recurrence relation and start with the easy cases):

- nimbus August 06, 2013 in United States

T(0) = 1

T(1) = 1

T(2) = 2

What is T(N) ?| Report Duplicate | Flag | PURGE

Twitter Software Engineer / Developer Brain Teasers - 3of 3 votes

AnswersA lot of transistors contains 0.6 percent defectives. Each transistor is subjected to a test that correctly identifies a defective but also misidentifies as defective about two in every 100 good transistors. Given that a randomly chosen transistor is declared defective by the tester, compute the probability that it is actually defective.

- sarora9876 July 29, 2013 in United States| Report Duplicate | Flag | PURGE

Amazon Analyst Brain Teasers - 4of 4 votes

Answersgiven a matrix of size m * n, place k students in such a way so that cheating in an exam could be minimized

- dddd July 27, 2013 in United States| Report Duplicate | Flag | PURGE

Algorithm Brain Teasers Coding - 1of 9 votes

AnswersGiven one egg and a building with infinite number of floors. Find out minimum number of throws at which (least) floor egg will break, if thrown?

- Nitin Gupta July 19, 2013 in India for Illustrator

I said we have to start at floor 1 and keep incrementing and testing by moving 1 floor up. Then he said optimize it by minimizing no of throws. I could not find more optimal way. I told him that I know with problem with 2 eggs and finite floor building.

Then, he told me that now lets there are 2 eggs and infinite floor building, find minimum no if throws required to find least floor at which egg breaks.

I still could not do that for infinite floors.| Report Duplicate | Flag | PURGE

Adobe Member Technical Staff Brain Teasers - -3of 5 votes

AnswersYou are given two eggs of same size and shape, there is a 50 stories building. you have to find the toughest egg in minimum number of attempts. Once egg is broken you won't be given a replacement.

- King007 July 01, 2013 in India for Java| Report Duplicate | Flag | PURGE

Software Engineer / Developer Brain Teasers - 5of 5 votes

Answers100 doors are closed , In first pass i open all of them , in 2nd pass i toggle every 2nd door , in 3rd pass i toggle every 3rd door , i continue it till 100th pass .. find all the doors that will remain open after 100 passes.

- anag June 26, 2013 in United States| Report Duplicate | Flag | PURGE

Amazon SDE1 Brain Teasers - 5of 5 votes

Answersfind the sum of all 4 digit numbers formed from 1 , 2, 3, 4 whithout rep .

- anag June 26, 2013 in United States| Report Duplicate | Flag | PURGE

Amazon SDE1 Brain Teasers

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window