微软公司的面试问题

微软公司的面试问题

以下是微软公司的员工在面试时所遇到的问题。微软的顾问有时会得到一些特殊待遇,因此在面试时询问他们的问题并不真的算数,所以没有列在下面。  

  这些问题往往遵循以下一些基本主题:难题、运算、应用、头脑。  

  难题  

   
  ★为什么下水道的井盖是圆的?  

  ★美国有多少辆车?(一个常见的类似问题是:美国有多少家加油站?)  

  ★美国有多少个下水道井盖?  

  ★你让某些人为你工作了七天,你要用一根金条作为报酬。这根金条要被分成七块。你必须在每天的活干完后交给他们一块。如果你只能将这根金条切割两次,你怎样给这些工人分?  

  ★一列火车以每小时15英里的速度离开洛杉矶,朝纽约进发。另外一列火车以每小时20英里的速度离开纽约,朝洛杉矶进发。如果一只每小时飞行25英里的鸟同时离开洛杉矶,在两列火车之间往返飞行,请问当两列火车相遇时,鸟飞了多远?  

  ★假设一张圆盘像唱机上的唱盘那样转动。这张盘一半是黑色,一半是白色。假设你有数量不限的一些颜色传感器。要想确定圆盘转动的方向,你需要在它周围摆多少个颜色传感器?它们应该被摆放在什么位置?  

  ★假设时钟到了12点。注意时针和分针重叠在一起。在一天之中,时针和分针共重叠多少次?你知道它们重叠时的具体时间吗?  

  ★你有两个罐子,分别装着50个红色的玻璃球和50个蓝色的玻璃球。随意拿起一个罐子,然后从里面拿出一个玻璃球。怎样最大程度地增加让自己拿到红球的机会?利用这种方法,拿到红球的几率有多大?  

  ★中间只隔一个数字的两个奇数被称为奇数对,比如17和19。证明奇数对之间的数字总能被6整除(假设这两个奇数都大于6)。现在证明没有由三个奇数组成的奇数对。  

  ★一个屋子有一个门(门是关闭的)和3盏电灯。屋外有3个开关,分别与这3盏灯相连。你可以随意操纵这些开关,可一旦你将门打开,就不能变换开关了。确定每个开关具体管哪盏灯。  

  ★假设你有8个球,其中一个略微重一些,但是找出这个球的惟一方法是将两个球放在天平上对比。最少要称多少次才能找出这个较重的球?  

  ★假设你站在镜子前,抬起左手,抬起右手,看看镜中的自己。当你抬起左手时,镜中的自己抬起的似乎是右手。可是当你仰头时,镜中的自己也在仰头,而不是低头。为什么镜子中的影像似乎颠倒了左右,却没有颠倒上下?  

  ★ 你有4瓶药。每粒药丸的重量是固定的,不过其中有一瓶药受到了污染,药丸的重量发生了变化,每个药丸增加了一点重量。你怎样一下子测出哪瓶药是遭到污染的呢?  

  ★下面玩一个拆字游戏,所有字母的顺序都被打乱。你要判断这个字是什么。假设这个被拆开的字由5个字母组成:  

  1. 共有多少种可能的组合方式?  

  2. 如果我们知道是哪5个字母,那会怎么样?  

  3. 找出一种解决这个问题的方法。  

  ★有4个女人要过一座桥。她们都站在桥的某一边,要让她们在17分钟内全部通过这座桥。这时是晚上。她们只有一个手电筒。最多只能让两个人同时过桥。不管是谁过桥,不管是一个人还是两个人,必须要带着手电筒。手电筒必须要传来传去,不能扔过去。每个女人过桥的速度不同,两个人的速度必须以较慢的那个人的速度过桥。  

  第一个女人:过桥需要1分钟;  

  第二个女人:过桥需要2分钟;  

  第三个女人:过桥需要5分钟;  

  第四个女人:过桥需要10分钟。  

  比如,如果第一个女人与第4个女人首先过桥,等她们过去时,已经过去了10分钟。如果让第4个女人将手电筒送回去,那么等她到达桥的另一端时,总共用去了20分钟,行动也就失败了。怎样让这4个女人在17分钟内过桥?还有别的什么方法?  

  ★如果你有一个5夸脱的水桶和一个3夸脱的水桶,如何准确量出4夸脱的水?  

  ★你有一袋糖,有红色的,蓝色的,绿色的。闭上眼睛,拿出两块颜色一样的糖,你需要拿多少次才能确保有两块颜色相同的?  

  ★如果你有两个桶,一个装的是红色的颜料,另一个装的是蓝色的颜料。你从蓝色颜料桶里舀一杯,倒入红色颜料桶,再从红色颜料桶里舀一杯倒入蓝颜料桶。两个桶中红蓝颜料的比例哪个更高?通过算术的方式来证明这一点。

pcl2004_27 2004-10-15 11:31

运算  

  ★链接表和数组之间的区别是什么?  

  ★做一个链接表,你为什么要选择这样的方法?  

   
  ★选择一种算法来整理出一个链接表。你为什么要选择这种方法?现在用O(n)时间来做。  

  ★说说各种股票分类算法的优点和缺点。  

  ★用一种算法来颠倒一个链接表的顺序。现在在不用递归式的情况下做一遍。  

  ★用一种算法在一个循环的链接表里插入一个节点,但不得穿越链接表。  

  ★用一种算法整理一个数组。你为什么选择这种方法?  

  ★用一种算法使通用字符串相匹配。  

  ★颠倒一个字符串。优化速度。优化空间。  

  ★颠倒一个句子中的词的顺序,比如将“我叫克丽丝”转换为“克丽丝叫我”,实现速度最快,移动最少。  

  ★找到一个子字符串。优化速度。优化空间。  

  ★比较两个字符串,用O(n)时间和恒量空间。  

  ★假设你有一个用1001个整数组成的数组,这些整数是任意排列的,但是你知道所有的整数都在1到1000(包括1000)之间。此外,除一个数字出现两次外,其他所有数字只出现一次。假设你只能对这个数组做一次处理,用一种算法找出重复的那个数字。如果你在运算中使用了辅助的存储方式,那么你能找到不用这种方式的算法吗?  

  ★不用乘法或加法增加8倍。现在用同样的方法增加7倍。

pcl2004_27 2004-10-15 11:31

应用  

  ★如何将计算机技术应用于一幢100层高的办公大楼的电梯系统上?你怎样优化这种应用?工作日时的交通、楼层或时间等因素会对此产生怎样的影响?  

  ★你如何对一种可以随时存在文件中或从因特网上拷贝下来的操作系统实施保护措施,   
防止被非法复制?  

  ★你如何重新设计自动取款机?  

  ★假设我们想通过电脑来操作一台微波炉,你会开发什么样的软件来完成这个任务?  

  ★你如何为一辆汽车设计一台咖啡机?  

  ★ 如果你想给微软的Word系统增加点内容,你会增加什么样的内容?  

  ★你会给只有一只手的用户设计什么样的键盘?  

  ★你会给失聪的人设计什么样的闹钟?

pcl2004_27 2004-10-15 11:31

头脑  

  ★如果你有一个许多部件可以拆卸的时钟,你将它一块块拆开,但是没有记住是怎样拆的。然后你将各个零件重新组装起来,最后发现有三个重要零件没有放进去。这时你如何重新组装这个时钟?  

   
  ★如果你需要学习一门新的计算机语言,你会怎样做?  

  ★假设由你负责设计比尔·盖茨的卫生间。当然,钱不成问题,但是你不可以和比尔谈。你会怎样做?  

  ★到目前为止,你遇到的最难回答的问题是什么?  

  ★如果微软公司说,我们愿意投资500万美元用来开发你提出的方案。那么你会做什么?为什么?  

  ★如果你将世界上所有的计算机制造商召集起来,告诉他们必须要做一件事,你会让他们做什么事?  

  ★如果你在五年内会得到一笔奖金,你认为会是因为什么?关注你的成绩的人会是谁?  

  ★你如何教自己的奶奶使用微软Excel表格系统?  

  ★为什么当我们在任何一家宾馆打开热水龙头时,热水会马上流出来?  

  ★你为什么想在微软工作?  

  ★假设你回到家,进入自己的房间,打开电灯开关,可是一点反应都没有——灯没有亮。这时,你在判断问题出在哪里时,会依次采取怎样的做法?

pcl2004_27 2004-10-15 11:39

据说属微软公司的面试题.

原题目描述:

已知两个数字为1~30的,甲知道两数只和,乙知道两数之积,甲问乙:“你知道是
那两个数吗?”乙说:“不知道”。乙问甲:“你知道是那两个数吗?”甲说:“也
不知道”。于是,乙说 :“那我知道了”随后甲也说:“那我也知道了”这两个数是'什么?

以下用VB。NET实现:

    Dim NUM, SUM, PRODUCT As Int32
    Dim Product1()() As Int32
    Dim i, m, n, Sum1(3)() As Int32

    Private Sub MyMain()
        Product1 = Nothing
        NUM = CInt(Me.TextBox1.Text)
        GetSum1()
        GetProduct1()
        For m = 1 To NUM
            For n = m To NUM
                If SumOnly(m, n) Or ProductOnly(m, n) Then GoTo NextItem '不好意思用了个GOTO
                SUM = m + n
                PRODUCT = m * n
                '甲的和产生的积中最多有(n -2)个是唯一积
                If SUMtoPRODUCT_N_2(SUM) < 2 Then GoTo NextItem
                '乙的积产生的和中有且只有一个满足1、不是唯一和 2、和产生的积中最多有(n -2)个是唯一积
                '并且其余的和均满足 1、不是唯一和 2、有n-1个唯一积
                If PROCUCTtoSUM(PRODUCT) Then
                    MsgBox(m.ToString() & "  " & n.ToString())
                End If
NextItem:   Next

        Next

    End Sub
    Private Sub GetSum1()
        '产生唯一和并保存在数组中
        ReDim Sum1(0)(1)
        Sum1(0)(0) = 1
        Sum1(0)(1) = 1
        ReDim Sum1(1)(1)
        Sum1(1)(0) = 1
        Sum1(1)(1) = 2
        ReDim Sum1(2)(1)
        Sum1(2)(0) = NUM - 1
        Sum1(2)(1) = NUM
        ReDim Sum1(3)(1)
        Sum1(3)(0) = NUM
        Sum1(3)(1) = NUM
    End Sub
    Private Function SumOnly(ByVal N1 As Int32, ByVal N2 As Int32) As Boolean
        '判断是否为唯一和
        Dim i As Int32
        For i = 0 To 3
            If N1 = Sum1(i)(0) AndAlso N2 = Sum1(i)(1) Then Return True
        Next
        Return False
    End Function
    Private Sub GetProduct1()
        '产生唯一积并保存在数组中
        Dim tmp(NUM * NUM)() As Int32
        For m = 1 To NUM '????????????????
            For n = m To NUM  '??????????????
                Dim meme() As Int32 = tmp(m * n)
                If meme Is Nothing Then
                    ReDim meme(2)
                Else
                    ReDim Preserve meme(meme.Length + 1)
                End If

                meme(meme.Length - 1) = m
                meme(meme.Length - 2) = n
                meme(0) += 1
                tmp(m * n) = meme
                meme = Nothing
            Next
        Next
        For i = 1 To NUM * NUM
            If Not tmp(i) Is Nothing AndAlso tmp(i)(0) = 1 Then
                For m = 1 To tmp(i).GetUpperBound(0) Step 2
                    If Product1 Is Nothing Then
                        ReDim Product1(0)
                        ReDim Product1(0)(1)
                    Else
                        ReDim Preserve Product1(Product1.Length)
                        ReDim Product1(Product1.Length - 1)(1)
                    End If
                    Product1(Product1.Length - 1)(0) = tmp(i)(m)
                    Product1(Product1.Length - 1)(1) = tmp(i)(m + 1)
                Next
            End If
        Next
    End Sub
    Private Function ProductOnly(ByVal N1 As Int32, ByVal N2 As Int32) As Boolean
        '判断是否为唯一积
        Dim i As Int32
        For i = 0 To Product1.GetUpperBound(0)
            If N1 = Product1(i)(1) AndAlso N2 = Product1(i)(0) Then Return True
            If N1 = Product1(i)(0) AndAlso N2 = Product1(i)(1) Then Return True
        Next
        Return False
    End Function
    Private Function SUMtoPRODUCT_N_2(ByVal SUM As Int32) As Int32
        '甲的和产生的积中最多有(n -2)个是唯一积
        Dim n As Int32 = CInt(SUM / 2 - 0.2)
        Dim i, m As Int32
        For i = 1 To n
            If ProductOnly(i, SUM - i) Then m += 1
        Next
        Return n - m
    End Function
    Private Function PROCUCTtoSUM(ByVal PRODUCT As Int32) As Boolean
        '乙的积产生的和中有且只有一个满足1、不是唯一和 2、和产生的积中最多有(n -2)个是唯一积
        '并且其余的和均满足 1、不是唯一和 2、有n-1个唯一积
        Dim tmp()(), i, m, n As Int32
        '1、分解积看能产生多少个和
        For i = 1 To CInt(Math.Sqrt(PRODUCT) - 0.4)
            If PRODUCT Mod i = 0 Then
                If tmp Is Nothing Then
                    ReDim tmp(0)
                    ReDim tmp(0)(2)
                Else
                    ReDim Preserve tmp(tmp.Length)
                    ReDim Preserve tmp(tmp.Length - 1)(2)
                End If
                tmp(tmp.Length - 1)(2) = PRODUCT / i
                tmp(tmp.Length - 1)(1) = i
                If Not SumOnly(tmp(tmp.Length - 1)(1), tmp(tmp.Length - 1)(2)) And SUMtoPRODUCT_N_2(i + PRODUCT / i) >= 2 Then
                    '和不为唯一和,且和产生的积中支多有n-2个是唯一积
                    tmp(tmp.Length - 1)(0) = 1
                End If
                If SumOnly(tmp(tmp.Length - 1)(1), tmp(tmp.Length - 1)(2)) Then
                    '唯一和
                    tmp(tmp.Length - 1)(0) = 3
                End If
                If Not SumOnly(tmp(tmp.Length - 1)(1), tmp(tmp.Length - 1)(2)) And SUMtoPRODUCT_N_2(i + PRODUCT / i) = 1 Then
                    '不是唯一和,但是有n-1个唯一积
                    tmp(tmp.Length - 1)(0) = 2
                End If
            End If
        Next
        Dim count As Int32 = 0
        For i = 0 To tmp.Length - 1
            If tmp(i)(0) = 0 Then Return False
            If tmp(i)(0) = 1 Then count += 1
        Next
        If count <> 1 Then Return False
        Return True
    End Function

pcl2004_27 2004-10-15 11:41

***怎么分苹果***(微软公司面试题)

***怎么分苹果***(微软公司面试题)
把1000 个苹果 分到10 个篮子 里
(当然苹果分到篮子里后就不能再动了,只能分一次)
要求:
用这10个篮子能够组成1-1000 任意一个数字
例如:你拿出了3 个篮子,苹果数分别为28,34,53 这样你组成了115
这个数字
(我只是给个例子,可千万别这么分)

答案思路:按照二进制的思想,如下分:
1,2,4,8,16,32,64,128,256,489

即可。

pcl2004_27 2004-10-15 11:42

微软公司的面试题(看看有没有资格进微软)

在很久以前,有一个国家,这个国家有一个小村庄有100户人家,每家养了一条狗。有一天村子里发现有疯狗,然后国王下令要杀死疯狗,但是狗的主人不能看出自家的狗是疯狗,只有别人却看的出,但是别人却不能对疯狗的主人说:你家的是疯狗。国王规定在每天的下午四点到六点开始杀疯狗。日子久这样一天一天的过去了,到了90天以后,村子里一片枪响,请问一共有几条疯狗???


思路:
   咔咔!!!~~~~假设第一天村子里只有一天疯狗,就是说99个人能看到一条疯狗,疯狗的主任能看到99条没疯的狗,到了杀狗的时间,疯狗的主人想:村子里肯定有一条疯狗,但是99人的狗都是不疯的,那自己的狗肯定是疯狗,就拿枪把自己的狗杀了。在假设第二天村子有两条疯狗,就是说有98个人能看到2条疯狗,疯狗的主人能看到98条不疯的狗和1条疯狗,不疯狗的主任能看到97条不疯的狗和2条疯狗,那肯定自己的不是疯狗。然后到了杀狗的时间,有98个人都不杀,剩下只能看到1条疯狗的主人想,村子里有2条疯狗,自己只能看到1条,那自己的肯定是疯狗了,看到1条疯狗的主人就拿枪把自己的狗杀了。一次类推。。。。。。最终的答案是村子里一共有90条疯狗(我表达能力不强,这么解释你们明白吗??)

pcl2004_27 2004-10-15 11:47

微软公司IT技术专家碰到的一次面试题

迈克和托德的薪水相差 $21 。迈克的薪水比托德多 $20 。迈克的薪水是多少?托德的薪水是多少? (答案中不包含小数点)

这个问题是微软公司IT技术专家史蒂夫?多布斯曾在一次面试上遇到的, 那次面试是多布斯所经历的最令人筋疲力尽的面试之一。这个问题对应聘电话技术支持这一职位到底有什么用呢?

“那时, 我实在看不出这个问题与我应聘的职位有何相关之处,”多布斯说。“但现在回顾起来, 我觉得它和技术支持领域的确有一些类同之处, 通常情况下,技术方面的问题总不能轻而易举的得到答案,有时你必须从新审视你的假设,从本质上讲,它们的基本规则是相同的。”

在那次面试中尽管多布斯得出了答案,他却并没有得到那份工作。“我告诉他们我计算这道题的全部思考过程,包括我怎样用排除法将相近的答案去掉,”他说。“当我说到算出这道题目的唯一方法是忘掉‘答案中不包括小数点’这一规则时, 他们似乎对我走出了陷阱感到非常满意” (算出来的结果是 $20.50 和 50美分。答案应该是整个的数字。)

金融业做人力资源的人士也很喜欢在面试中玩类似的游戏。他们认为投资者、银行家和其它金融方面的专家都必须是能在巨大压力下仍能够出色工作的人, 许多招聘者都认为在面试的时候给应试者出一道难题是测试他们是否具备良好应试心态的一个好方法。市场营销业人力资源的人士也很乐意给面试者一些坚难的挑战,例如,请为一个 19 世纪 50 年代的音频电话设计一个行销方案等等。

总的来看,在面试的时候,给应试者出一些看似与专业不相关题目,玩这种游戏的多是高科技企业,如dot-com招聘软件开发及工程师等职位。

pcl2004_27 2004-10-15 11:53

微软招聘总经理助理的3道面试题

1、某手机厂家由于设计失误,有可能造成电池寿命比原来设计的寿命短一半(不是冲放电时间),解决方案就是免费更换电池或给50元购买该厂家新手机的折换券。请给所有已购买的用户写信告诉解决方案。

  2、一高层领导在参观某博物馆时,向博物馆馆员小王要了一块明代的城砖作为纪念,按国家规定,任何人不得将博物馆收藏品变为私有。博物馆馆长需要如何写信给这位领导,将城砖取回。

  3、营业员小姐由于工作失误,将2万元的笔记本电脑以1.2万元错卖给李先生,王小姐的经理怎么写信给李先生试图将钱要回来?

  微软中国公司总裁唐骏说:“真可惜,我在很多场合都出过这三题,但到目前为止,还没有一个人能完全答对,有人答对了一题,所以他当上了我的助理。

pcl2004_27 2004-10-15 11:59

转载

当初还在读Chris Sells的《ATL Internals》,寻找勘误表时,找到了他的网站,然后发现了这些传说中的微软面试题,现在好像又添了不少新的题目:

Microsoft Interview Questions

这些题目确实是微软面试题么?我们是否可以请这里的微软员工来证实一下?

我们曾经想过是不是用这里的一些问题来考我们的应征程序员,但后来一想,搞微软技术的没几个不知道Chris Sells的,大概很多人都看过这些题目了,实在没意思,就放弃了。

Microsoft Interview Questions
The following are actual questions from actual interviews conducted by Microsoft employees on the main campus. Microsoft Consultants are sometimes allowed to have a life, so questions asked of them during interviews don't really count and aren't listed.

The questions tend to follow some basic themes:

Riddles
Algorithms
Applications
Thinkers

pcl2004_27 2004-10-15 12:04

.There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace.
  Woman 1: 1 minute to cross
  Woman 2: 2 minutes to cross
  Woman 3: 5 minutes to cross
   Woman 4: 10 minutes to cross

For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?

.If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
.You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?
.If you have two buckets, one with red paint and the other with blue paint, and you take one cup from the blue bucket and poor it into the red bucket. Then you take one cup from the red bucket and poor it into the blue bucket. Which bucket has the highest ratio between red and blue? Prove it mathematically

pcl2004_27 2004-10-15 12:07

Algorithms
.What's the difference between a linked list and an array?
.Implement a linked list. Why did you pick the method you did?
.Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.
.Describe advantages and disadvantages of the various stock sorting algorithms.
.Implement an algorithm to reverse a linked list. Now do it without recursion.
.Implement an algorithm to insert a node into a circular linked list without traversing it.
.Implement an algorithm to sort an array. Why did you pick the method you did?
.Implement an algorithm to do wild card string matching.
.Implement strstr() (or some other string library function).
.Reverse a string. Optimize for speed. Optimize for space.
.Reverse the words in a sentence, i.e. "My name is Chris" becomes "Chris is name My." Optimize for speed. Optimize for space.
.Find a substring. Optimize for speed. Optimize for space.
.Compare two strings using O(n) time with constant space.
.Suppose you have an array of 1001 integers. The integers are in random order, but you know each of the integers is between 1 and 1000 (inclusive). In addition, each number appears only once in the array, except for one number, which occurs twice. Assume that you can access each element of the array only once. Describe an algorithm to find the repeated number. If you used auxiliary storage in your algorithm, can you find an algorithm that does not require it?
.Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
.Multiple by 8 without using multiplication or addition. Now do the same with 7.
Add numbers in base n (not any of the popular ones like 10, 16, 8 or 2 -- I hear that Charles Simonyi, the inventor of Hungarian Notation, favors -2 when asking this question).
.Write routines to read and write a bounded buffer.
.Write routines to manage a heap using an existing array.
.Implement an algorithm to take an array and return one with only unique elements in it.
.Implement an algorithm that takes two strings as input, and returns the intersection of the two, with each letter represented at most once. Now speed it up. Now test it.
.Implement an algorithm to print out all files below a given root node.
Given that you are receiving samples from an instrument at a constant rate, and you have constant storage space, how would you design a storage algorithm that would allow me to get a representative readout of data, no matter when I looked at it? In other words, representative of the behavior of the system to date.
.How would you find a cycle in a linked list?
.Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
.The following asm block performs a common math function, what is it?
cwd xor ax, dx
sub ax, dx
.Imagine this scenario:
I/O completion ports are communictaions ports which take handles to files, sockets, or any other I/O. When a Read or Write is submitted to them, they cache the data (if necessary), and attempt to take the request to completion. Upon error or completion, they call a user-supplied function to let the users application know that that particular request has completed. They work asynchronously, and can process an unlimited number of simultaneous requests.
Design the implementation and thread models for I/O completion ports. Remember to take into account multi-processor machines.
.Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value.
.Write a function to print all of the permutations of a string.
Implement malloc.
.Write a function to print the Fibonacci numbers.
.Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B.
.How would you write qsort?
.How would you print out the data in a binary tree, level by level, starting at the top?

pcl2004_27 2004-10-15 12:11

Applications
How can computer technology be integrated in an elevator system for a hundred story office building? How do you optimize for availability? How would variation of traffic over a typical work week or floor or time of day affect this?
How would you implement copy-protection on a control which can be embedded in a document and duplicated readily via the Internet?
Define a user interface for indenting selected text in a Word document. Consider selections ranging from a single sentence up through selections of several pages. Consider selections not currently visible or only partially visible. What are the states of the new UI controls? How will the user know what the controls are for and when to use them?
How would you redesign an ATM? (怎样重新设计atm,和上边很相似)
Suppose we wanted to run a microwave oven from the computer. What kind of software would you write to do this?
What is the difference between an Ethernet Address and an IP address?
How would you design a coffee-machine for an automobile.
If you could add any feature to Microsoft Word, what would it be?
How would you go about building a keyboard for 1-handed users?
How would you build an alarm clock for deaf people?

pcl2004_27 2004-10-15 12:11

Thinkers
How are M&Ms made?
If you had a clock with lots of moving mechanical parts, you took it apart piece by piece without keeping track of the method of how it was disassembled, then you put it back together and discovered that 3 important parts were not included; how would you go about reassembling the clock?
If you had to learn a new computer language, how would you go about doing it?
You have been assigned to design Bill Gates bathroom. Naturally, cost is not a consideration. You may not speak to Bill.
What was the hardest question asked of you so far today?
If MS told you we were willing to invest $5 million in a start up of your choice, what business would you start? Why?
If you could gather all of the computer manufacturers in the world together into one room and then tell them one thing that they would be compelled to do, what would it be?
Explain a scenario for testing a salt shaker.
If you are going to receive an award in 5 years, what is it for and who is the audience?
How would you explain how to use Microsoft Excel to your grandma?
Why is it that when you turn on the hot water in any hotel, for example, the hot water comes pouring out almost instantaneously?
Why do you want to work at Microsoft?
Suppose you go home, enter your house/apartment, hit the light switch, and nothing happens - no light floods the room. What exactly, in order, are the steps you would take in determining what the problem was?
Interviewer hands you a black pen and says nothing but "This pen is red."

pcl2004_27 2004-10-15 12:18

Microsoft Interview Questions & Answers

I recently visited Microsoft's Silicon Valley campus and interviewed with the Hotmail group. If you've never had a Microsoft interview, realize that they are very different than the standard interview. You won't be asked any of those questions like, "What is your greatest weakness," or, "Where do you want to be in five years?" Rather, a Microsoft interview typically contains a number of brain teasers and coding questions. In fact, you can read interview questions from my internship interviews.

Here are the questions I was asked, accompanied with the answers right below the question! So, once you reach the end of the question, don't read any further unless you want to immediately know the answer! Anyway, here goes:

Question: How could you determine if a linked list contains a cycle in it, and, at what node the cycle starts?

Answer: There are a number of approaches. The approach I shared is in time N (where N is the number of nodes in your linked list). Assume that the node definition contains a boolean flag, bVisited.

struct Node
{
  ...
  bool bVisited;
};

Then, to determine whether a node has a loop, you could first set this flag to false for all of the nodes:

// Detect cycle
// Note: pHead points to the head of the list (assume already exists)
Node *pCurrent = pHead;
while (pCurrent)
{
  pCurrent->bVisited = false;
  pCurrent = pCurrent->pNext;
}
Then, to determine whether or not a cycle existed, loop through each node. After visiting a node, set bVisited to true. When you first visit a node, check to see if the node has already been visited (i.e., test bVisited == true). If it has, you've hit the start of the cycle!

bool bCycle = false;
pCurrent = pHead;
while (pCurrent && !pCycle)
{
  if (pCurrent->bVisited == true)
    // cycle!
    pCycle = true;
  else
  {
    pCurrent->bVisited = true;
    pCurrent = pCurrent->pNext;
  }
}

pcl2004_27 2004-10-15 12:19

A much better approach was submitted by 4Guys visitor George R., a Microsoft interviewer/employee. He recommended using the following technique, which is in time O(N) and space O(1).


Use two pointers.
// error checking and checking for NULL at end of list omitted
p1 = p2 = head;

do {
        p1 = p1->next;
        p2 = p2->next->next;
} while (p1 != p2);




p2 is moving through the list twice as fast as p1. If the list is circular, (i.e. a cycle exists) it will eventually get around to that sluggard, p1.

Thanks George!

Question: How would you reverse a doubly-linked list?

Answer: This problem isn't too hard. You just need to start at the head of the list, and iterate to the end. At each node, swap the values of pNext and pPrev. Finally, set pHead to the last node in the list.

Node * pCurrent = pHead, *pTemp;
while (pCurrent)
{
  pTemp = pCurrent->pNext;
  pCurrent->pNext = pCurrent->pPrev;
  pCurrent->pPrev = temp;
  
  pHead = pCurrent;

  pCurrent = temp;
}

Question: Assume you have an array that contains a number of strings (perhaps char * a[100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams within the array (two words are anagrams if they contain the same characters; for example, tales and slate are anagrams.)

Answer: Begin by sorting each element in the array in alphabetical order. So, if one element of your array was slate, it would be rearranged to form aelst (use some mechanism to know that the particular instance of aelst maps to slate). At this point, you slate and tales would be identical: aelst.

Next, sort the entire array of these modified dictionary words. Now, all of the anagrams are grouped together. Finally, step through the array and display duplicate terms, mapping the sorted letters (aelst) back to the word (slate or tales).

Question: Given the following prototype:

int compact(int * p, int size);  


write a function that will take a sorted array, possibly with duplicates, and compact the array, returning the new length of the array. That is, if p points to an array containing: 1, 3, 7, 7, 8, 9, 9, 9, 10, when the function returns, the contents of p should be: 1, 3, 7, 8, 9, 10, with a length of 5 returned.

Answer: A single loop will accomplish this.

int compact(int * p, int size)
{
  int current, insert = 1;
  for (current=1; current < size; current++)
    if (p[current] != p[insert-1])
    {
      p[insert] = p[current];
      current++;
      insert++;
    } else
      current++;
}

Happy Programming!

pcl2004_27 2004-10-15 12:27

Microsoft Interview Questions

Interviewing at Microsoft used to be different from Interviwing at other companines. However, with the advent of a new economy and the Internet things have changed dramatically in the past few years.more and more companies are adopting microsoft interviewing philosophy and hence their questions. Here is a typical set of Interview questions asked for an entry level software Design Engineer(SDE) or Internship position.

1.If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
2.If you are on a boat and you throw out a suitcase, will the level of water increase?
3.On an average, how many times would you have to open the Seattle phone book to find a specific name?
4.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?
5.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!)
6.What new feature would you add to MSWORD if you were hired?
7.Why did you pick the school you graduated from?
8.Why do you want to work for Microsoft?
9.How many Gas stations are there in the US?
10.How would you weigh a plane without using scales?
11.How would you move Mt. Everest?
12.Two 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?

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)

There 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 continously 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).

pcl2004_27 2004-10-15 12:30

Microsoft Interview Questions

1. The three types of DAO Dynaset,Snapshot,Table
2. Why do we use Option Explicit
3. Difference between Dim Object as object AND dim obj as myform
4. How do we make a poperty read only? Private Property Get(Read Only )
5. How do you declare an object in VBscript? Dim object
6. What is the equivalent of VBScript’s On Error In Jscript ??
7. How many data types are supported in Vbscript
8. MFC
9. Java
10. Active Server Pages
11. What are session variables??
12. In what languages in ASP written.
13. How do you create Virtual Root in IIS
14. How do you remotely administer MS IIS??
15. What is the key advantage of Windows NT Challenge/Response security?
16. What problems do the vendors of ODBC Technology face with ASP/ADO ?
18. How do you administer Connection Pooling in IIS 3.0
19. How do you administer Connection Pooling in IIS 4.0
20. What are the three Ado objects?? –Connection,command, recordset
21. Two Methods of retrieving SQL
22. How do you assign Construct the where clause without concatenating Field,
value pairs??
23. What cursor type do you use to retrieve multiple recordsets?
24. What action do you have to perform before retrieving data from the next
result set of a stored procedure ??
25. What are The three tags of a form tag in HTML form
26. What are The two tags for framesets
27. How do you create Drop Down Combos in HTML ? select Tag
28. In DHTML what is the difference between FontSize and Font Size ??
A: FontSize is a property, Font Size is a style
29. What is the tag Code Base and why do we use it?
30. How can you have different number of cells for each row of a table?

three file types in NT ? NTFS,Macintosh(HPFS), FAT
32. Describe a two tier Windows NT Domain?
33. Define and explain COM
34. What is IUnknown and what are its three parts??

35. Define Query Interface,Adref,Release
36. Do COM keep track of all the object references(Accounting)??
37. What is Marshalling
38. When is Marshalling not necessary??

迷茫中... 2004-10-15 12:34

:s

pcl2004_27 2004-10-15 12:35

Why is a manhole cover round? A Microsoft interview question.

OK, so it probably isn't an "official" interview question (if there are any), but I have asked it during interviews in the past. For me, it is simply a way to help loosen up the interviewer and have some fun, but if the only answer I get is "I don't know, why is it?", then that gives me the impression that the person either isn't trying to really interview, or that they just aren't very creative.

So, why is a manhole cover round? Heck if I know, but here are some good answers that I've heard over the years:

Because the hole is round (duh!)
Because animals dig round holes, so it feels natural to humans too
Because a circle offsets the straight lines of a city
Because it is easier to roll the cover some distance than carry it
Because it won't fall into the hole - but, the same is true for an equilateral triangle
Because it is easier to pour hot metal into a circular mold than one with sharp corners
I suppose there are more, and there is probably some web site with the "correct" answer. But I like these because I can remember the individuals who have told them to me over the years. What's your answer?

pcl2004_27 2004-10-15 12:40

继续中

pcl2004_27 2004-10-15 12:59

Apparently, these are questions that have been asked by Microsoft interviewers:

1) You are on a small boat at the sea with a trunk as luggage. If you throw it out of the boat to the water, Does boat raise?

2) How would you weight a Jumbo plane without using a scale? (I know one very good answer replied by an applicant engineer)


补充答案(不确定):
Regarding Question 1:

As long as the luggage is heavier than what it replaces it in the boat, the boat rises in the water.

If the luggage floats, the water level stays the same. If the luggage sinks, so does the water level.

So, if the luggage floats, the boat will rise.

If the luggage sinks, then the water level will drop, but the boat will rise in the water. How much the boat rises depends on the geometry of the boat.

Whether the

Regarding Question 2:

Calculate the total thrust the engines supply, and then measure the acceleration, or use a similar approach with a tow car.

Measure the pressure above and below the wings and calculate the net force.

Measure the change in the suspension springs while the plane is being fueled.

Create an exact scale model, and extrapolate, or use the blueprints.

pcl2004_27 2004-10-15 13:00

Microsoft MSN interview questions

Aaron Boodman took up a job with Microsoft (MSN division) and told the story of his interview in his Weblog. Below is an excerpt of questions potential candidates might find interesting.

Compare and contrast SQL Server with MySQL.
Compare and contrast stored procedures and dynamic SQL.

Describe a standard 3-tier architecture and the interfaces between each tier.
Compare and contrast a rich client and browser-based web application
Compare and contrast WS and remoting protocols.
Design the data structures for the game battleship.
Consider the Dead Sea Scrolls. Imagine that you have these torn up old shreds of paper with ancient words on them. You want to develop an application that will display one sheet at a time on the screen. When the user left-clicks a word, the page containing the previous occurence of that word is displayed and the word is highlighted. When the user right-clicks a word, the page containing the next occurence is displayed and the word is highlighted. When the user double-clicks a word, the definition is displayed. How would you design the application?
Given an array of the counties in NY represented as arrays of line segments, find the collection of line segments which represent the outline of the state.
Consider an SOA rich-client application used by several international vendors, where one vendor sees bandwidth usage
far exceeding what would be expected based on their usage. What steps would you follow to debug the problem?
Imagine a trainyard. The purpose of a trainyard is to reorder trains so that they are most efficiently grouped for outbound travel. The basic unit of a trainyard is a piece of track which looks like the figure below. The train operator can perform three operations: move a car from the source to the spur, from the source to the destination, or from the spur to the destination. So, for example, he could reverse a train by moving each car onto the spur and then moving each car onto the destination. Write a function which, given an array of integers representing the order of cars on the source, and another representing the order of cars desired on the destination, prints instructions telling the trainyard operator which operations to perform to reorder the train correctly.
Implement a function which, given the integer value of the hours and minutes hands of a clock, returns the measure of the degrees between them.
Find the lowest valued node in a Binary Search Tree (BST) greater than or equal to a a certain value.
Verify that a given BST is valid.
Given the following database table, which represents the history of user account statuses, give the query that returns the users which had a certain status on a certain day.
Implement the datastructures for a Tree and a function to populate it based off a page of text.

pcl2004_27 2004-10-15 13:06

微软针对软件测试工程师的题目 Questions for Testers

A friend of mine sent along some questions he was asked for a SDE/T position at Microsoft (Software Design Engineer in Test):
1."How would you deal with changes being made a week or so before the ship date?
2."How would you deal with a bug that no one wants to fix? Both the SDE and his lead have said they won't fix it.
3."Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function.
4."Given a MAKEFILE (yeah a makefile), design the data structure that a parser would create and then write code that iterates over that data structure executing commands if needed.
5."Write a function that inserts an integer into a linked list in ascending order. Write the test cases for this function.
6."Test the save dialog in Notepad. (This was the question I enjoyed the most).
7."Write the InStr function. Write the test cases for this function.
8."Write a function that will return the number of days in a month (no using System.DateTime).
9."You have 3 jars. Each jar has a label on it: white, black, or white&black. You have 3 sets of marbles: white, black, and white&black. One set is stored in one jar. The labels on the jars are guaranteed to be incorrect (i.e. white will not contain white). Which jar would you choose from to give you the best chances of identifying the which set of marbles in is in which jar.
10."Why do you want to work for Microsoft.
11."Write the test cases for a vending machine.

"Those were the questions I was asked. I had a lot of discussions about how to handle situations. Such as a tester is focused on one part of an SDK. During triage it was determined that that portion of the SDK was not on the critical path, and the tester was needed elsewhere. But the tester continued to test that portion because it is his baby. How would you get him to stop testing that portion and work on what needs to be worked on?

"Other situations came up like arranging tests into the different testing buckets (functional, stress, perf, etc.)."

kitty_wangxin 2004-10-15 15:44

我在进入葡萄城的时候就进行了上面的第一到题的面试。(井盖为什么是园的?)我当时就傻了。随便胡说了一通。

一个新手 2004-10-16 21:22

辛苦了,呵呵

coolseal 2004-10-18 16:17

好多呀

kyle106 2004-10-18 17:49

训练一下思维还是可以的,微软那就甭想进了!

lwiln 2004-10-20 11:32

呵呵,晕

saxifrage 2004-10-20 21:35

天啦!没几个会做。

晕……

pamela0000000 2004-10-22 17:14

我只求能看懂解答了

QA_BAY 2004-10-23 17:56

★有4个女人要过一座桥。她们都站在桥的某一边,要让她们在17分钟内全部通过这座桥。这时是晚上。她们只有一个手电筒。最多只能让两个人同时过桥。不管是谁过桥,不管是一个人还是两个人,必须要带着手电筒。手电筒必须要传来传去,不能扔过去。每个女人过桥的速度不同,两个人的速度必须以较慢的那个人的速度过桥。  

  第一个女人:过桥需要1分钟;  

  第二个女人:过桥需要2分钟;  

  第三个女人:过桥需要5分钟;  

  第四个女人:过桥需要10分钟。  

  比如,如果第一个女人与第4个女人首先过桥,等她们过去时,已经过去了10分钟。如果让第4个女人将手电筒送回去,那么等她到达桥的另一端时,总共用去了20分钟,行动也就失败了。怎样让这4个女人在17分钟内过桥?还有别的什么方法?

方法就是:第一步:先叫第一个女人和第二个女人过桥先(花了2分钟),
第二步:叫第一个女人将手电筒送回去,(花了1分钟),
第三步:叫第三第四个女人过去(花了10分钟),
第四步:叫第二个女人将手电筒送回去(花了2分钟),
第五步:就是第一个女人和第二个女人一起过去,花了2分钟),
加起来总共花了17分钟!!!!这样就过完了阿!!

simple 2004-10-24 21:53

锻炼一下思维很有用的

qingyu0306 2004-10-25 10:41

希望能知道这些题的答案

hjh 2004-10-29 15:53

好多像脑筋急转弯~~~#盖为什么么是圆的?因为井口是圆的?

tomyone 2004-11-1 17:31

请版主把答案公布好吗

neusdc 2004-11-5 11:23

@_@

adonis_zhw 2004-12-15 12:13

哈哈啊

....

[[i] Last edited by adonis_zhw on 2004-12-15 at 12:34 [/i]]

wsj112233 2005-1-9 20:36

哇      果然有意思           有挑战性

snoppy123123 2005-1-11 12:31

我要看答案。

冰河 2005-1-11 12:46

我想看答案!!

sanjieyu 2005-1-12 10:56

很多题应该不止一个解答的吧

Nokia0906 2005-1-13 10:56

答案呢?

我也想知道答案,谢谢。不过你的答案中有错别字,算不算BUG啊?呵呵,关于疯狗的那题的答案中,是[color=Red]“主人”[/color]而不是[color=Red]“主任”[/color],还有很多哦,呵呵,不会骂我吧?

[[i] Last edited by Nokia0906 on 2005-1-13 at 11:03 [/i]]

stiff 2005-2-9 15:26

井盖是圆的就不会掉下去 了啊

tigerzhang 2005-2-20 10:07

为什么下水道的井盖是圆的?

警匪片里土匪就是这么逃生的!我想肯定是那些土匪发明的吧!呵呵!

冰河 2005-2-21 16:29

呵呵。楼上说的有意思!

但这样的考题能看出面试者的思维是否灵活!

YanGY 2005-2-25 09:03

答案???

amy_gm 2006-4-14 10:57

井盖是圆的原因

最正确的是,只有圆的井盖不会掉到井里。因为方的盖子斜着放的时候会掉下去。
好像是这样的

zhanglishiyan 2006-5-17 20:17

根据工程力学,一般下水道都是设计为圆柱体,这样受力好!所以井盖是原形的!

tianhight 2006-5-26 17:42

 ★如果你有一个5夸脱的水桶和一个3夸脱的水桶,如何准确量出4夸脱的水?  

这题好象挺简单的,先把装满3夸脱的桶,然后倒出来,然后用3夸脱的桶装满两次,多出来的水和刚才的水加一起不就是4夸脱吗?不知道对不对。

jackei 2006-6-5 14:55

[quote]原帖由 [i]amy_gm[/i] 于 2006-4-14 10:57 发表
最正确的是,只有圆的井盖不会掉到井里。因为方的盖子斜着放的时候会掉下去。
好像是这样的 [/quote]

这并非最正确的答案。要知道下水道的井盖总是比下水道的口要大,所以即使是方形的,如果想让它掉下去,那也要很费劲的抬起沉重的井盖,然后移动30°以上,才能掉进去。

还不如说因为下水道的口是圆的,所以井盖才是圆的——君不见也有方形的下水道井盖吗?^_^

cmy_cc 2006-6-6 09:57

太不人道了!呵呵,怎么有的题像脑筋急转弯?!

kuncat 2006-6-6 16:47

[quote]原帖由 [i]jackei[/i] 于 2006-6-5 14:55 发表


这并非最正确的答案。要知道下水道的井盖总是比下水道的口要大,所以即使是方形的,如果想让它掉下去,那也要很费劲的抬起沉重的井盖,然后移动30°以上,才能掉进去。

还不如说因为下水道的口是圆的,所以 ... [/quote]


我有回答的是这样可以省无用功,每次盖井盖的时候圆形最好盖,而方形还要对一下边才能盖上!

李才军 2006-6-13 10:37

好做啊

Joan2005 2006-7-12 17:02

下记下,有空看

AlexanderIII 2006-7-12 23:33

[quote]原帖由 [i]kuncat[/i] 于 2006-6-6 16:47 发表



我有回答的是这样可以省无用功,每次盖井盖的时候圆形最好盖,而方形还要对一下边才能盖上! [/quote]

我觉得是不是可以考虑一下圆形与方形的承受力的能力来讨论?(是不是变成物理题了?呵呵)

daisypan 2006-7-13 17:11

好难,迫切想看答案

sxfreesky 2006-7-16 16:13

如果你有一个5夸脱的水桶和一个3夸脱的水桶,如何准确量出4夸脱的水?

装满5单位的水桶,把水再倒进3单位的桶里,剩下2单位,清空3单位水桶里的水,将5单位水桶里的2单位水倒进3单位的水桶里,3单位桶还剩1单位的空间,5-1=4,OK!

sxfreesky 2006-7-16 22:41

★有4个女人要过一座桥。她们都站在桥的某一边,要让她们在17分钟内全部通过这座桥。这时是晚上。她们只有一个手电筒。最多只能让两个人同时过桥。不管是谁过桥,不管是一个人还是两个人,必须要带着手电筒。手电筒必须要传来传去,不能扔过去。每个女人过桥的速度不同,两个人的速度必须以较慢的那个人的速度过桥。  

  第一个女人:过桥需要1分钟;  

  第二个女人:过桥需要2分钟;  

  第三个女人:过桥需要5分钟;  

  第四个女人:过桥需要10分钟。  

  比如,如果第一个女人与第4个女人首先过桥,等她们过去时,已经过去了10分钟。如果让第4个女人将手电筒送回去,那么等她到达桥的另一端时,总共用去了20分钟,行动也就失败了。怎样让这4个女人在17分钟内过桥?还有别的什么方法?

郁闷死,用了半个多小时的时间才得到这个题的答案,刚准备发上来,却发现已有前辈的答案摆那里了,我是不是很苯啊。

joden 2006-7-18 15:39

哇,好多啊,真不错,这一定要顶一个

jennie98 2006-7-19 21:07

[quote]原帖由 [i]QA_BAY[/i] 于 2004-10-23 17:56 发表
★有4个女人要过一座桥。她们都站在桥的某一边,要让她们在17分钟内全部通过这座桥。这时是晚上。她们只有一个手电筒。最多只能让两个人同时过桥。不管是谁过桥不管是一个人还是两个人,必须要带着手电筒。手电 ... [/quote]

哈哈,我最近面试也做到了这个题,本人回答和班主一样,哈哈

peterzhu 2006-8-3 13:47

哇,不错呀,不愧是世界最牛的软件公司啊,面试题不同凡响啊

Win_1018 2006-8-23 15:27

我要看答案

walker_lai 2006-8-30 22:55

太精彩了

walker_lai 2006-8-30 22:57

回复 #2 pcl2004_27 的帖子

太精彩了

walker_lai 2006-9-1 17:57

回复 #3 pcl2004_27 的帖子

学习下先啊

changlang530 2007-8-28 18:18

收藏了!!

poi0110 2007-8-29 15:47

留个记号,等着看答案~

lxtheiio 2007-8-29 22:25

*一个屋子有一个门(门是关闭的)和3盏电灯。屋外有3个开关,分别与这3盏灯相连。你可以随意操纵这些开关,可一旦你将门打开,就不能变换开关了。确定每个开关具体管哪盏灯。  

假设开关编号A,B,C,
步骤:
1.打开A,等几分钟,关闭A
2.打开B
3.推门,灯亮的对应开关B,用手触摸一下三个电灯,有温度的对应开关A,没有温度的对应开关C

:)不知道对不对呢??

hotsu 2007-8-30 22:33

非常人所能及也

tianmingyang 2007-9-4 19:15

[quote]原帖由 [i]lxtheiio[/i] 于 2007-8-29 22:25 发表 [url=http://bbs.51testing.com/redirect.php?goto=findpost&pid=689123&ptid=3334][img]http://bbs.51testing.com/images/common/back.gif[/img][/url]
*一个屋子有一个门(门是关闭的)和3盏电灯。屋外有3个开关,分别与这3盏灯相连。你可以随意操纵这些开关,可一旦你将门打开,就不能变换开关了。确定每个开关具体管哪盏灯。  

假设开关编号A,B,C,
步骤:
... [/quote]
恩  应该是这样的 呵呵~

yuxuan555269 2007-11-21 15:58

比较有意思
 

你可能感兴趣的:(微软公司的面试问题)