[Repost] Microsoft programmer test questions

zhaozj2021-02-12  139

One. The most basic questions (description: This type of problem is relatively simple)

1. Burn a non-uniform rope, which takes an hour from the head to the tail. Now there are several ropes as the same material, ask how to use the ro turns to time a 10th minute fifteen minutes? (This question I thought about an hour)

2. You have a bucket of jelly, including yellow, green, red, close your eyes, grabbing two colors. How many can you determine if you have two simultaneous jelly? (5 seconds - 1 minute)

3. If you have an endless water, a 3 liter of rack, a 5 liter, the shape is not uniform, ask you how to accurately call 4 liters of water? (40 seconds - 3 minutes)

4. One of the intersections leads to honesty and the lies, respectively. Two people have been known, known as honesty, the other is to talk about the lie. Honest is always truth forever, and the lies will always talk forever. Now you have to talk to the country, but I don't know which path you should go, you need to ask these two people. What should I ask? (20 seconds - 2 minutes)

5.12 Balls One balance, now I know that only one and other weights are different, ask how to find that ball with three times. 13? (Note that this question does not mean that the weight of the ball is light, so it needs to be carefully considered) (5 minutes - 1 hour)

6. Painting 10 straight lines in 9 points, requires at least three points on each straight line? (3 minutes - 20 minutes)

7. How many times is there a few times in 24 hours a day, the clock's hour, minute, and second needles completely coincide together? What time is it? How do you calculate it? (5 minutes -15 minutes)

two. There is no answer (note: These questions are obviously not taking your intelligence. The test is your ability to respond. This problem has no answer, but you have to look at your reaction!)

1. Why is the cover of the waterway?

2. How many cars have?

3. Insert the car key into the door, rotate in which direction can be opened?

4. If you want to remove any one of China's 34 provinces (including autonomous regions, municipalities and Hong Kong and Macao Special Zones and Taiwan), why?

5. How many gas stations can meet all China's car?

6. Imagine that you stand before the mirror, please ask, why do you have an image in the mirror to reverse it, but can't you reverse it?

7. Why is you in any hotel, you will open hot water, hot water will pour in an instant?

8. How do you explain Excel's usage to your grandmother?

9. How do you re-improve and design an ATM bank ATM card?

10. If you have to re-learn a new computer language, how do you plan to start?

11. If your career plan is planned to be rewarded within 5 years, what is the motivation for this reward? Who is the audience? 12. If Microsoft tells you, we intend to invest five million US dollars to launch your investment plan. What kind of business plan will you start? why? 13. If you can collect the computer vendors of the world in an office, then tell them will be forced to do something, what will this matter?

three. Puzzle (Description: This type of question is certain, if you can't get the answer, you can't explain what you think about the question, then the answer will come out soon. If you can't think about it, then ... Don't want to solve it. 1. You let the workers work for 7 days for you, the return is a gold bars, this gold bars are divided into seven segments, you must give them a gold bars at the end of each day. If you only allow you to break the gold bars twice, how do you pay for your workers?

2. One train leaves Beijing to Beijing from Guangzhou, at the speed of 15 kilometers per hour, and another train is from Guangzhou to Beijing at the speed of 20 kilometers per hour. If there is a bird, start at the same time and the two trains at the same time, starting from Beijing, returning to the opposite direction after touching another car, so it is in the two trains. Flying until the two trains meet. Excuse me, how long is this bird fly?

3. You have four pills, each pill has a certain weight, the contaminated pill is the weight of the pills that are not contaminated. Only weigh one time, how to determine which can the medicine is contaminated?

4. Three switches outside the door correspond to the indoor three lamps, the line is good, and the indoor light cannot be seen when the switch is controlled outside the door. Now it is only allowed to enter the door, determine the corresponding relationship between the switch and the lamp? 5. Why is the renminbi only have a face value of 1, 2, 5, and 10?

6. You have two jars and 50 red playballs and 50 blue playballs, randomly select a jar, randomly select a play ball into a jar, how to give the biggest chance of red playball? What is the chance of getting the red ball in your plan?

four. Super-difficult (Description: If you see this question for the first time, and I have never seen a similar type of topic, and I can make an answer within half an hour. I can only show your intelligence. ...

The first question. Five pirates grabbed 100 gems, each is the same size and value in the city. They decided this:

Lottery determines your own number (1, 2, 3, 4, 5)

First, the allocation scheme is proposed, then everyone vote, when and only when more than half of the people agree, according to his program, otherwise it will be thrown into the big sea feed shark

If you die on the 1st, the allocation scheme is proposed, then the remaining 4 people will vote, and when and only more than half of the people agree, according to his program, it will be thrown into the sea to feed shark

So on and so forth

Conditions: Every pirate is very smart, it can make a sense of judgment and make choices. Question: What distribution plan is the first pirate to maximize your income?

The second question. A problem about the plane refueling, known:

There is only one fuel tank for each plane.

The aircraft can be refueled to each other (note that mutual, no oil drum)

A box of oil is available for a plane to fly a half circle,

Question: In order to make at least one aircraft returned to the plane of the airport, at least a few aircraft needed? (All airplane take off from the same airport, and must be safely returned to the airport, not allowing the midway to land, there is no airport in the middle)

Fives. Subjective (Description: In the future work, we will definitely make such a mistake. Since the error has been made, the loss is inevitable, we can only find ways to reduce the loss to the smallest. If you can quite answered These problems, if you have a mistake, you can make customers have the least complaints, the company has the least loss.) 1. A mobile phone manufacturer can cause a short half of the battery life than the original design (not the electricity Time), the solution is free to replace the battery or give 50 yuan to purchase the fold voucher of the new mobile phone. Please write a letter to all purchased users to tell the solution.

2. A high-level leader is visiting a museum, and a small king of Ming Dynasty as a commemoration of the museum, according to the state, anyone may not change the museum collection into private. How does the museum curator need to write a letter to this leader and take the city brick back.

3. Miss Salesperson, due to the business mistake, will sell the laptop of 20,000 yuan to Mr. Li, Miss Wang's manager, how to write to Mr. Li trying to return money?

Sixth. Cases of the questions (notes: These questions are not a trick, the test is how your basic knowledge. People who are smart and no real studies will be eliminated by these questions.)

1. Where is the difference between the linked list and array?

2. Write an algorithm for realizing the sort of linked lists. Explanation Why do you choose this way?

3. Write an algorithm for implementing array sorting. Explanation Why do you choose this way?

4. Please write code that can directly implement the strstr () function function.

5. Write procedures for reverse strings, require optimization speed, optimize space.

6. How do I find a loop link in the list?

7. An algorithm for the shuffle and store the washed card in a plastic array.

8. Write a function, check if the character is an integer, if yes, return its integer value. (Or: How to write a function from a string to long plastic surgery with 4 lines of code?)

9. Give a function to output all arrangements of a string.

10. Please write the same code as the malloc () memory allocation function.

11. Give a function to copy two strings A and B. The first few bytes of string A overlap the first few bytes of string b.

12. How to write a program and put a ordered integer array in the binary tree?

13. How to print the binary tandem data layer by layer from the top? Please program.

14. How to drop a chain list (that is, in the order, pay attention to the boundary conditions of the linked list and consider the empty list)?

转载请注明原文地址:https://www.9cbs.com/read-7623.html

New Post(0)