Math & Computation Interview Questions
- 2of 0 votes
Answershow do you compute the number of digit after . in floating point number.
- Anonymous November 30, 2008
e.g. if given 3.554 output=3
for 43.000 output=0| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersImplement an algorithm to generate all prime number from 1-100 in fastest and most efficient way
- Ratan October 16, 2008| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Math & Computation Coding - 0of 0 votes
AnswersYou have a scooter which needs two tires. You are given three tires. Each tire has a max life of one year. What is the max time you can run your scooter?
- ujjwal akash September 19, 2008| Report Duplicate | Flag | PURGE
Yahoo Software Engineer in Test Math & Computation - 0of 0 votes
AnswersImplement float returnAngle(int hour,int min) that tells you the angle between the hour and the minute hands on a clock.
- Retrun angle given hour and minute August 19, 2008
so basically at 2:00 the angle is 60deg, the function should return 60.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Math & Computation Coding - -3of 3 votes
AnswersThere is 100mile length tunnel, and two trains whose speed 100mph on the opposite sides. A bee comes b/w two trains with the speed of 100mph.... You guys already know this problem! :)
- MJ July 22, 2008| Report Duplicate | Flag | PURGE
Morgan Stanley Software Engineer / Developer Math & Computation - 0of 0 votes
Answers8 tires were used on a bus (6 tires) which has traveled 16000 km. How many km did each tire sustain, if all the tires were used equally in sustaining this distance?
- Blitz June 08, 2008| Report Duplicate | Flag | PURGE
Caritor Software Engineer / Developer Math & Computation - 0of 0 votes
Answersgiven a integer, output its previous and next neighbor number which has the same number of bit 1 in their binary representation.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 1of 1 vote
Answershow to divide an integer array into 2 sub-arrays and make their averages equal? e.g. a[left_portion]/left_portion_num == a[right_portion]/right_portion_num.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersAn array A[1...n] contains all the integers from 0 to n except one. In this problem, we cannot access an entire integer in A with a single operation. The elements of A are represented in binary, and the only operation we can use to access them is "fetch the jth bit of A[i]", which takes constant time. Find the missing integer in O(n) time.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersGiven 1 GB memory, input a file which contians 4 billion integers, output one integer that is not in the file. What if you have only 10 MB memory?
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm Math & Computation Data Structures - 1of 0 votes
AnswersInput an integer array of size n and an integer k (k<=n), output all subsets of size k.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
Answersif p & p^2+8 are prime, prove that p^3+16 is prime
- oxygen August 13, 2007| Report Duplicate | Flag | PURGE
Globaltech Research Software Engineer / Developer Math & Computation - 0of 0 votes
Answers40% of a program will not benefit from additional processors because it is inherently sequential. How many processors are needed to execute a program in 150 seconds, if it required 300 seconds with 1 processor.
- AlgoFreak June 10, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersThree friends divided some bullets equally. After all of them shot 4 bullets the total no. of remaining bullets is equal to that of one has after division. Find the original number divided.
- Ravi Kant Pandey April 04, 2007| Report Duplicate | Flag | PURGE
Infosys Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersFor a balanced binary search tree find the number of leaf nodes for a tree with depth 10.
- Sach (Sachin) December 21, 2006| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersGiven 2 squares on a 2 dimensional plane, find a line that would cut these two squares in half.
- vodangkhoa December 08, 2006| Report Duplicate | Flag | PURGE
Goldman Sachs Analyst Brain Teasers Math & Computation - 0of 0 votes
AnswersA geometry/math problem:
- Jack November 14, 2006
Given a triangle and two intersecting line segments within the triangle, find the angle made by the intersection of these two segments.| Report Duplicate | Flag | PURGE
American Airlines Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersProve that the number between any two twin primes is always divisible by 6.
- P August 19, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersBrainteaser: there is a bar with 25 seats in a line. The people there are anti-social so when they walk in the bar, they always try to find a seat farthest away from others. If one person walks in and find there is no seat are adjecent to nobody, that person will walk away. The bar owner wants as many people as possible. The owner can tell the first customer where to sit. all the other customers will pick the farthest possible seat from others. So where should the first customer sit.
- Little Bread June 08, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Brain Teasers Math & Computation - 0of 0 votes
AnswersWhen i wasn't certain whether my random function generated with equal probability all permutations, the interviewer asked me to write a formal proof that it works or not and send it to him (really strange).
- Muhariz Jabeer May 24, 2006
Proved it with the following and he bought it:
Probabilisticly
card 1 has 52 positions it can fit in
card 2 has 51
card 3 has 50
so on and so forth
card 52 has 1 position to fit in
hence its 52 x 51 x 50 x ... x 1 = 52! can be generated using this shuffle.
Oblivious to me, aparantly this kind of shuffle is used a lot in online card games. Silly me :P| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersAssuming that you could play this game as many times as you liked, how would you decide how many times to play it? NOTE: Though question 2 is central to much of human activity, there is no single agreed upon solution to it. We are interested in the reasoning that you undergo to arrive at a reasonable conclusion
- Jack April 08, 2006| Report Duplicate | Flag | PURGE
Rebellion Research Software Engineer / Developer Math & Computation - 0of 0 votes
AnswerConsider a purely probabilistic game with potential outcomes x1, x2, ..., xn (each of which is a specified gain or loss of some number of dollars) which occur with the probabilities p1, p2, ..., pn respectively (where, p1 + p2 + ... + pn = 1.0). Assume that x1, x2, ..., xn and p1, p2, ..., pn are known. Theoretically speaking, how would you define or measure the risk of playing this game?
- Jack April 08, 2006| Report Duplicate | Flag | PURGE
Rebellion Research Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersThree ants on different vertices of a triangle. All can walk on the sides of the triangle. Find the probability of them colliding.(collision could be between any two or all three).
- Sach April 04, 2006
Now find the same for n vertex polygon with n ants.| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Math & Computation - 0of 0 votes
AnswersWrite code to find the dot product and cross product.
- Henrick March 07, 2006
Given 3 points on plane and a point in space, find the distance between the point and the plane.
Find the location of the point projected to the plane.| Report Duplicate | Flag | PURGE
Microsoft Math & Computation Coding - 0of 0 votes
AnswersAdd numbers in base n
- vodangkhoa March 05, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation - 0of 0 votes
Answers3rd Interview - Technical. You have 5 basketball teams. You want them to play each other only once. Each team plays once a week. If a team plays a home game this week, They should play a aways game the coming week. How many weeks does it take for all the teams for play each other?
- vodangkhoa April 14, 2005| Report Duplicate | Flag | PURGE
Intuit Software Engineer / Developer Math & Computation