Analytical reasoning Interview Questions | Glassdoor

# Analytical reasoning Interview Questions

61

interview questions shared by candidates

## Analytical reasoning Interview Questions

Sort: RelevancePopular Date

Mar 11, 2009

Nov 8, 2009

Mar 21, 2010
 You have a genealogy: 1) Describe a data structure to represent it. 2) Given any two people within the genealogy, describe an algorithm to determine if they share a common ancestor. You just need to return true/false, not all ancestors.6 Answers1) Each person is represented by an object, with two pointers: "mom" and "dad" that point to their respective parent. 2) Choose one of the two people arbitrarily. Perform depth-first traversal and create a set of ancestors reachable from that person. Perform depth-first traversal on the 2nd person and for each node visited check if they are in the set; if yes, return true. Use a hash-set for best performance.calculate the height of person 1 in the tree, calculate the height of person 2. Move them up to be the same height. Then keep going until they intersect.@user: Its not a tree. A genealogy is a graph due to the fact that you have maternal and paternal trees intersecting. Therefore there is no root from which to calculate height.Show More ResponsesIf you've optimizing for worst case, hash set is O(n) for search. You'd do better in worst case with a sorted structure. You'd do even better if you store a "visited" flag at each node. Alternately you can number each node and keep an array of visited flags. since depth first seach might find a longer link through dad before checking mom, you're better off with breadth first search. Anything reachable in one hop would be seen before anything reachable at best in 2 hopsYes. Good points. The second traversal should be breadth first. The first traversal it doesn't matter, as you need to visit all ancestors anyways. The use of a visited flag is a good optimization. Based upon the way the question was worded, it wasn't clear if you could design the data structure to optimize the algorithm or not.I belive both the first and second should be BFS traversals

### Mobile Developer at Pocket Gems was asked...

Feb 20, 2012
 At a movie theater, the manager announces that they will give a free ticket to the first person in line whose birthday is the same as someone who has already bought a ticket. You have the option of getting in line at any time. Assuming that you don't know anyone else's birthday, that birthdays are distributed randomly throughout the year, etc., what position in line gives you the greatest chance of being the first duplicate birthday? 2 Answersx/x-1 < 356/(365 - x)20th

### Mobile Developer at Pocket Gems was asked...

Feb 20, 2012
 You are in a game of Russian Roulette with a revolver that has 3 bullets placed in three consecutive chambers. The cylinder of the gun will be spun once at the beginning of the game. Then, the gun will be passed between two players until it fires. Would you prefer to go first or second?2 AnswersWould go First as Probability for winning is 4/6.Imagine a 6 chamber gun with chambers labeled A through F in a circular fashion. Chambers A, B, and C have the bullets (remember the bullets are placed consecutively). If the first shot is from chambers A, B, or C, Player 1 dies/loses. If chamber D is first, Player 1 will win. If chamber E fires first, Player 1 will die/lose once the gun is passed back to him at chamber A. So overall, Player 1 has a 4/6 chance of dying, and Player 2 has a 2/6 chance of dying. Therefore, I would prefer to go second.

### Systems Engineer at BAE Systems USA was asked...

Mar 25, 2009
 Why does a curveball pitch in baseball curve?3 AnswersI would suggest doing a search to get a good technical answer to this. It will have to do with changes in pressure most likely.The secret behind the curveball is the spinning action created when the pitcher releases the ball. Friction and air are the keyIt's the spinning of the ball. Picture the ball segmented through its axis with a plane parallel to the ground. The top half is spinning forward (forward relative to its translating motion). The forward rotation increases the drag of the ball due to the no-slip boundary condition of the air flow at the immediate surface of the ball. The bottom half is the opposite. The ball is rotating away from the translated motion and the drag is less. The resultant vector of the drag force on the ball is pointed more toward the ground.

### IT Support Manager at Florida Virtual School was asked...

Dec 2, 2009
 What would you do if you were faced with a problem that you could not solve.2 AnswersAny problem can be solved with th right resources. Get help and keep working it until it is fixed.The answer posted is an excellent answer but if it were me I would counter with another question. The quite obvious answer could be the worst possible solution. Why would you want me to solve a problem inefficiently through trial and error that could possibly result in greater complexities and produce additional problems? There is always a time when a problem may not have an immediate and effective solution. They as management should be asking themselves this same question: What do yout do in the case that a single resource cannot adequately address a problem?

### Associate at L.E.K. Consulting was asked...

Dec 4, 2010
 How many people are in Logan Airport at 9am on a Monday morning?2 AnswersNeed to remember that some flights can use Boston as a connection. Don't forget passengers have family/friends that send them off. The best approach is to divide out into different categories of people: passengers, workers, friends/fam etc. and then estimate each. To estimate passengers, estimate number of run ways available (based on # of terminals) and what portion has planes, how big the size of the plane is etc...Do not forget the number of runways in order to estimate the number of passengers

### Portfolio Analytics Group at BlackRock was asked...

Oct 7, 2010
 If you had 2 6-sided dice, what's the probability you get a 7?2 Answershere are the different ways you can get 7 1-6 6-1 2-5 5-2 3-4 4-3 prob(7) = [Prob(1)*prob(6) + prob(6)*prob(1).......................+prob(4)*Prob(3)] = 1/6You should ask if the dice are fair.

### Architect at NVIDIA was asked...

Sep 22, 2009
 Four people, (A, B, C, and D) need to get across a river, and there is only one boat. The boat can only hold two people at a time and will only go as fast as the slowest person in the boat. If it takes A one minute to cross, B two minutes, C five minutes, and D seven minutes, what is the shortest time for all 4 people to cross the river?3 Answers14 minutes is the fastest time. A and B go first (2 min), then A comes back (3 min), next C and D goes (10 min), then B comes back (12 min), finally A and B go across again (14 min). The trick is hiding C's time within D.The other guy has got it wrong . When C and D go how come B comes back ? 1. D and A go . A comes back - = 7+1 = = 8 min 2. A and C go . A comes back = 5+1 = 6 min 3 A and B go . = 2 min Total time 16 minWell, Whar the above person means is, A+B go ---> 2 mins A comes back --> 1 min C+D go --> 7 mins B comes back --> 2 mins A+B go --> 2 mins. Total --> 14 mins B comes back because he has crossed the river and is on the other side and can come back.
110 of 61 Interview Questions