Search Your Question
Wednesday, July 23, 2008
Microsoft Aptitude Questions
# Mike has $20 more than Todd. How much does each have given that combined they have $21 between them. You can't use fractions in the answer.(Hint: This is a trick question, pay close attention to the condition)
# Here are four dogs, each at the counter of a large square. Each of the dogs begins chasing the dog clockwise from it. All of the dogs run at the same speed. All continuously adjust their direction so that they are always heading straight towards their clockwise neighbor. How long does it take for the dogs to catch each other? Where does this happen? (Hint: Dog's are moving in a symmetrical fashion, not along the edges of the square)
# If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
# If you are on a boat and you throw out a suitcase, will the level of water increase?
# On an average, how many times would you have to open the Seattle phone book to find a specific name?
# There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don't collide?
# If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? ( The answer to this is not zero!)
# What new feature would you add to MS WORD if you were hired?
# Why did you pick the school you graduated from?
# How would you weigh a plane without using scales?
# How would you move Mt. Everest?
# MIT math graduates bump into each other at Fairway on the upper west side. They hadn't seen each other in over 20 years.
The first grad says to the second: "how have you been?"
Second: "Great! I got married and I have three daughters now"
First: "Really? how old are they?"
Second: "Well, the product of their ages is 72, and the sum of their ages is the same as the number on that building over there.."
First: "Right, ok.. oh wait.. hmmmm.., I still don't know"
second: "Oh sorry, the oldest one just started to play the piano"
First: "Wonderful! my oldest is the same age!"
Problem: How old are the daughters?
# Why are beer cans tapered at the top and bottom?
# Why is it that hot water in a hotel comes out instantly but at home it takes time?
# How many times a day a clock's hands overlap?
Microsoft Job Inteview questions on Algorithms and Programming
# You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) ). Write a routine in C for the above.
# Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
# Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all
# Give a one-line C expression to test whether a number is a power of 2
# Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
# Give a very good method to count the number of ones in a "n" (e.g. 32) bit number
# Reverse a linked list.
# Insert in a sorted list
# Write a function to find the depth of a binary tree.
# Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Latest Microsoft Interview Questions
# Given a Parent -Child binary tree ,build the child -sibling version of it? Minimize the space requirements wherever possible.
# Given a binary tree build a linked list of all its nodes such that the nodes of a level appear before the nodes of the next level?
# Given an infinite stream of bits with the bits being appended at the highest significant position. give an algorithm to to say whether the number formed by using the sequence of bits that had been processed till then, is divisible by 3 or not?
# Given a string S of words and no of character per line m ,with m being greater than the longest word in S,print S in a set of lines so that each line contains no more than m characters and no word split between 2 lines.
# Given an expression remove the unnecessary brackets in it with out creating an ambiguity in its execution.
input output
ex1: (a+(b)+c) a+b+c
ex2: (a*b)+c a*b+c
# Propose a tree based data structure to identify a node with nth rank with maximum efficiency .
# Given a string S of alphabets and 2 characters a,b find the minimum distance between instances of them such that position of a <= position of b.
# Given an array of size n with first l positions filled with characters and a string s ,replace all the instances of ’%’ with this string s,given that the length of the array is sufficient to handle these substitutions.
input output
eg: abcdef%ghi%—— and “ppp” abcdefpppghippp
# Given a binary tree verify whether it is a binary search tree or not?
# Write a C code to merge 2 binary search trees and do the same 2 merge linked lists.How is the former different when compared to the later.(Discuss the issues)