??xml version="1.0" encoding="utf-8" standalone="yes"?>91麻豆国产精品91久久久,热久久这里只有精品,久久久婷婷五月亚洲97号色http://www.shnenglu.com/Walker/articles/146843.html漫步者?amp;…?K?/dc:creator>漫步者?amp;…?K?/author>Fri, 20 May 2011 23:40:00 GMThttp://www.shnenglu.com/Walker/articles/146843.htmlhttp://www.shnenglu.com/Walker/comments/146843.htmlhttp://www.shnenglu.com/Walker/articles/146843.html#Feedback0http://www.shnenglu.com/Walker/comments/commentRss/146843.htmlhttp://www.shnenglu.com/Walker/services/trackbacks/146843.html1、请你自我介l一下自己好吗?
回答提示Q一般h回答q个问题q于q_Q只说姓名、年龄、爱好、工作经验,q些在简历上都有。其实,企业最希望知道的是求职者能否胜d作,包括Q最强的技能、最深入研究的知识领域、个性中最U极的部分、做q的最成功的事Q主要的成就{,q些都可以和学习(fn)无关Q也可以和学?fn)有养I但要H出U极的个性和做事的能力,说得合情合理企业才会(x)怿。企业很重视一个h的礼貌,求职者要重考官Q在回答每个问题之后都说一?#8220;谢谢”Q企业喜Ƣ有CD的求职者?br />2、你觉得你个性上最大的优点是什么?
回答提示Q沉着冷静、条理清楚、立场坚定、顽强向上、乐于助人和兛_他h、适应能力和幽默感、乐观和友爱。我在北大青鸟经q一Cq的培训?qing)项目实战,加上实?fn)工作Q我适合q䆾工作?br />3、说说你最大的~点Q?br />回答提示Q这个问题企业问的概率很大,通常不希望听到直接回{的~点是什么等Q如果求职者说自己心眹{爱忌妒人、非常懒、脾气大、工作效率低Q企业肯定不?x)录用你。绝对不要自作聪明地回答“我最大的~点是过于追求完?#8221;Q有的h以ؓ(f)q样回答?x)显得自己比较出Ԍ但事实上Q他已经岌岌可危了。企业喜Ƣ求职者从自己的优点说P中间加一些小~点Q最后再把问题{回到优点上,H出优点的部分,企业喜欢聪明的求职者?br />4、你对薪资的要求Q?br />回答提示Q如果你对薪酬的要求太低Q那昄贬低自己的能力;如果你对薪酬的要求太高,那又?x)显得你分量q重Q公司受用不赗一些雇主通常都事先对求聘的职位定下开支预,因而他们第一ơ提出的价钱往往是他们所能给予的最高h(hun)钱,他们问你只不q想证实一下这W钱是否以引v你对该工作的兴趣?br />回答h一Q我对工资没有硬性要求,我相信贵公司在处理我的问题上?x)友善合理。我注重的是扑֯工作Z(x)Q所以只要条件公qI我则不会(x)计较太多?br />回答h二:(x)我受q系l的软g~程的训l,不需要进行大量的培训Q而且我本Z对编E特别感兴趣。因此,我希望公司能Ҏ(gu)我的情况和市场标准的水^Q给我合理的薪水?br />回答h三:(x)如果你必自p出具体数目,请不要说一个宽泛的范围Q那样你只能得到最低限度的数字。最好给Z个具体的数字Q这栯明你已经对当今的人才市场作了调查Q知道像自己q样学历的雇员有什么样的h(hun)倹{?br />5、你对加班的看法Q?br />回答提示Q实际上好多公司问这个问题,q不证明一定要加班Q只是想试你是否愿意ؓ(f)公司奉献?br />回答hQ如果工作需要我?x)义不容辞加班,我现在单w,没有M家庭负担Q可以全w心的投入工作。但同时我也?x)提高工作效率,减少不必要的加班?br />6、如果通过q次面试我们录用了你Q但工作一D|间却发现你根本不适合q个职位Q你怎么办?
回答提示Q一D|间发现工作不适合我,有两U情况:(x)①如果你确实热p个职业,那你p不断学习(fn)Q虚心向领导和同事学?fn)业务知识和处事l验Q了解这个职业的_内涵和职业要求,力争减少差距Q?#9313;你觉得这个职业可有可无,那还是趁早换个职业,d现适合你的Q你热爱的职业,那样你的发展前途也?x)大点,对单位和个h都有好处?br />7、谈谈你对蟩槽的看法Q?br />回答提示Q?#9312;正常?#8220;x”能促qh才合理流动,应该支持?#9313;频繁的蟩槽对单位和个人双斚w不利Q应该反寏V?br />8、工作中难以和同事、上司相处,你该怎么办?
回答提示Q?#9312;我会(x)服从领导的指挥,配合同事的工作?#9313;我会(x)从自w找原因Q仔l分析是不是自己工作做得不好让领g满意Q同事看不惯。还要看看是不是Zh处世斚w做得不好Q如果是q样的话我会(x)努力Ҏ(gu)?#9314;如果我找不到原因Q我?x)找Z(x)跟他们沟通,请他们指出我的不I有问题就?qing)时?gu)?#9315;作ؓ(f)优秀的员工,应该时刻以大局为重Q即使在一D|间内Q领导和同事Ҏ(gu)不理解,我也?x)做好本职工作,虚心向他们学习(fn),我相信,他们会(x)看见我在努力,L一天会(x)Ҏ(gu)微笑的?br />9、你对于我们公司了解多少Q?br />回答提示Q在d叔R试前上网查一下该公司主营业务。如回答Q贵公司有意改变{略Q加Z国外大厂的OEM合作Q自有品牌的部分则透过外l销商?br />10、最能概括你自己的三个词是什么?
回答提示Q我l常用的三个词是Q适应能力强,有责d和做事有始终Q结合具体例子向主考官解释Q?br />11、你的业余爱好是什么?
回答提示Q找一些富于团体合作精的Q这里有一个真实的故事Q有否决掉,因ؓ(f)他的爱好是深h水。主考官_(d)(x)因ؓ(f)q是一单人活动,我不敢肯定他能否适应团体工作?br />12、作面试者给我打一下分Q?br />回答提示Q试着列出四个优点和一个非帔R帔R常小的缺点(可以抱怨一下设施,没有明确责Q人的~点是不?x)有Z意的Q?br />13、你Z么要d原来的公?
回答提示Q?#9312;回答q个问题时一定要心Q就在前一个工作受到再大的委屈Q对公司有多的怨言Q都千万不要表现出来Q尤其要避免对公司本w主的批评Q避免面试官的负面情l及(qing)印象。徏议此时最好的回答方式是将问题归咎在自pn上,例如觉得工作没有学习(fn)发展的空_(d)自己惛_面试工作的相关业中多加学习(fn)Q或是前一份工作与自己的生涯规划不合等{,回答的答案最好是U极正面的?#9313;我希望能获得一份更好的工作Q如果机?x)来_(d)我会(x)抓住。我觉得目前的工作,已经辑ֈ峰Q即沒有升迁Z(x)?br />14、你ƣ赏哪种性格的hQ?br />回答提示Q诚实、不L而且Ҏ(gu)相处的h、有“实际行动”的h?br />15、你通常如何对待别h的批评?
回答提示Q?#9312;沈默是金Q不必说什么,否则情况更糟Q不q我?x)接受徏设性的批评?#9313;我会(x){大家冷靜下来再讨论?br />16、怎样对待自己的失败?
回答提示Q我们大家生来都不是十全十美的,我相信我有第二个Z(x)Ҏ(gu)我的错误?br />17、你Z么愿意到我们公司来工作?
回答提示Q对于这个问题,你要格外心Q如果你已经对该单位作了研究Q你可以回答一些详l的原因Q像“公司本n的高技术开发环境很吸引我?#8221;?#8220;我同公司出生在同L(fng)时代Q我希望能够q入一家与我共同成长的公司?#8221;?#8220;你们公司一直都E_发展Q在q几q来在市Z很有竞争力?#8221;?#8220;我认公司能够l我提供一个与众不同的发展道\?#8221;q都昄Z已经做了一些调查,也说明你对自q未来有了较ؓ(f)具体的远景规划?br />18、对q项工作Q你有哪些可预见的困难?
回答提示Q?#9312;不宜直接说出具体的困难,否则可能令对Ҏ(gu)疑应聘者不行?#9313;可以试q回战术Q说出应聘者对困难所持有的态度——工作中出C些困难是正常的,也是隑օ的,但是只要有坚忍不拔的毅力、良好的合作_以及(qing)事前周密而充分的准备QQ何困N是可以克服?br />19、如果录用了你,你将怎样开展工作?
回答提示Q?①如果应聘者对于应聘的职位~Z_的了解,最好不要直接说己开展工作的具体办法?#9313;可以试采用q回战术来回{,?#8220;首先听取领导的指C和要求Q然后就有关情况q行了解和熟(zhn),接下来制定一份近期的工作计划q报领导批准Q最后根据计划开展工作?#8221;?br />分析Q这个问题的主要目的也是了解应聘者的工作能力和计划性、条理性,而且重点惌知道l节。如果向思\中所讲的q回战术Q面试官?x)认为回遉K题,如果引导了几ơ仍然是回避的话Q此人绝对不?x)录用了?br />20、你希望与什么样的上U共事?
回答提示Q?#9312;通过应聘者对上?#8220;希望”可以判断出应聘者对自我要求的意识,q既上一个陷阱,又是一ơ机?x)?#9313;最好回避对上具体的希望,多谈对自q要求?#9314;?#8220;做ؓ(f)刚步入社?x)的ChQ我应该多要求自己尽快熟(zhn)环境、适应环境Q而不应该对环境提Z么要求,只要能发挥我的专长就可以了?br />分析Q这个问题比较好的回{是Q希望我的上U能够在工作中对我多指导Q对我工作中的错误能够立x出。MQ从上指导q个斚w谈,不会(x)有大的纰漏?br />21、与上意见不一Ӟ你将怎么办?
回答提示Q?#9312;一般可以这样回{?#8220;我会(x)l上U以必要的解释和提醒Q在q种情况下,我会(x)服从上的意见?#8221;②如果面试你的是ȝ理,而你所应聘的职位另有一位经理,且这位经理当时不在场Q可以这样回{:(x)“对于非原则性问题,我会(x)服从上的意见,对于涉及(qing)公司利益的重大问题,我希望能向更高层领导反映?#8221;
分析Q这个问题的标准{案是思\①Q如果用②的回{,必死无疑。你没有摸清楚改公司的内部情况,先想打小报告Q这L(fng)人没有h敢要?br />22、ؓ(f)什么选择我们公司Q?br />回答提示Q曾l在报章杂志看过关于贵公司的报道Q与自己所q求的理忉|志一同。而贵公司在业界的成W也是有目q的,而且对员工的教育训练、升q等也都很有制度?br />分析Q去面试前先做功课,了解一下该公司的背景,让对方觉得你真的很有心想得到q䆾工作Q而不只是探探路?br />23、谈谈如何适应办公室工作的新环境?
回答提示①办公室里每个人有各自的岗位与职责Q不得擅d位?#9313;Ҏ(gu)领导指示和工作安排,制定工作计划Q提前预备,q按计划完成?#9314;多请Cƈ?qing)时汇报Q遇C明白的要虚心h?#9315;抓间隙时_(d)多学?fn),努力提高自己的政ȝ质和业务水^?br />24、除了本公司外,q应聘了哪些公司Q?br />回答提示Q很奇怪,q是相当多公怼(x)问的问题Q其用意是要概略知道应R者的求职志向Q所以这ql对是负面答案,q不便说出公司名称Q也应回{?#8220;销售同U品的公司”Q如果应聘的其他公司是不同业界,Ҏ(gu)让h产生无法信Q的感觉?br />25、你q有什么问题要问吗Q?br />回答提示Q企业的q个问题看上d有可无,其实很关键,企业不喜Ƣ说“没问?#8221;的hQ因为其很注重员工的个性和创新能力。企业不喜欢求职者问个h利之类的问题,如果有hq样问:(x)贵公司对新入公司的员工有没有什么培训项目,我可以参加吗Q或者说贵公司的晋升机制是什么样的?企业很Ƣ迎Q因Z现出你对学习(fn)的热情和对公司的忠诚度以?qing)你的上q心?br />26、如果你被录用,何时可以到职Q?br />回答提示Q大多数企业?x)关心就职时_(d)最好是回答“如果被录用的话,到职日可按公司规定上?#8221;Q但如果q未辞去上一个工作、上班时间又太近Q似乎有些强人所难,因ؓ(f)交接臛_要一个月的时_(d)应进一步说明原因,录取公司应该?x)通融的?/p>

 

本文来自CSDN博客Q{载请标明出处Q?a >http://blog.csdn.net/dy_Learning/archive/2011/04/02/6298747.aspx



]]>
火Rq煤问题(?http://www.shnenglu.com/Walker/articles/143965.html漫步者?amp;…?K?/dc:creator>漫步者?amp;…?K?/author>Mon, 11 Apr 2011 11:36:00 GMThttp://www.shnenglu.com/Walker/articles/143965.htmlhttp://www.shnenglu.com/Walker/comments/143965.htmlhttp://www.shnenglu.com/Walker/articles/143965.html#Feedback0http://www.shnenglu.com/Walker/comments/commentRss/143965.htmlhttp://www.shnenglu.com/Walker/services/trackbacks/143965.html你是p的一个煤老板Q你在矿区开采了?000吨煤需要运送到市场上去卖,从你的矿区到市场?000公里Q你手里有一列烧煤的火RQ这个火车最多只能装1000吨煤Q且其能耗比较大——每一公里需要耗一吨煤。请问,作ؓ(f)一个懂~程的煤老板的你Q你?x)怎么q送才能运最多的煤到集市Q?/span>

火Rq行Ӟ最好让他满载,起始点记为A
W一步,分三ơ把煤运送到中间点B
W二步,分两ơ把煤运送到中间点C
W三步,把煤q送到目的地D
W一步:(x)5*(AB) = 1000Q解得AB=200
W二步:(x)3*BC = 1000Q解得BC=333.
W三步:(x)AB+BC+CD=1000Q解得CD=467
因此Q做多运?33吨煤到目的地

假定从A到B需?m+1ơ,距离为xQ那么运q去消?2m+1)x的煤。一开始的时候必?m+1)>=3才可以把煤运完,而且I是没有哦效率的,所?m+1)<4.
所以m=2Q而m=1是,所剩煤?000Qm=0Ӟ所剩煤?000.由m值可以得到距xQ和9g栗?br>同时Q在m不变的情况下Q可以Q意分D,比如m=2是,可以把煤q到50处,然后在运?00处,然后再运?00处,׃m都是{于2Q所以到200ӞM(x)剩下2000煤?br>所以实际上解有无群多,只要让煤?00Q?33的地斚w新聚集就行了?br>
首先Q要获得最大|必须在最q的中间”补给?#8221;放下{同其\E的煤作l。所以接下来要做的就是,如何?000吨煤攑ֈ最q的地方Q同时留?#8220;补给?#8221;。因为条仉Ӟ所以只能分两次达成上面的目标,W一个补l点Q他要消耗的是他路程?倍的煤,因ؓ(f)他自己消耗两ơ,W二ơ送煤的消耗两ơ,最后一ơ直辄点的要消耗一ơ。所以他要在1/5的地Ҏ(gu)下,W一个点已经提供补给Q所以第二点要补l?ơ,他自׃ơ,最后直辄一ơ。所以是?00+333的地Ҏ(gu)?33.所以最后到辄Q应该是200+333 = 533. L是其他g可以推导出来?br>~程的例子就是:(x)

int sum = 3000;
int load_num = 1000;

int result = 0;
int time = sum / load_num – 1;
for (int i = time; i > 0 ; –i) {
result += load_num / ((i*2) + 1);
}



]]>
GoogleW试?http://www.shnenglu.com/Walker/articles/136336.html漫步者?amp;…?K?/dc:creator>漫步者?amp;…?K?/author>Mon, 13 Dec 2010 14:16:00 GMThttp://www.shnenglu.com/Walker/articles/136336.html140个Google的面试题
2010q?2??/span> 陈皓 发表评论 阅读评论 4,360 ơ点?   

来源Q?a onclick="pageTracker._trackPageview('/outgoing/blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html?referer=');" target=_blank>http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.htmlQ墙Q?br>

某猎头收集了140多个Google的面试题Q都张到他的Blog中了Q主要是下面q些职位的,因ؓ(f)被墙Q且无Q何敏感信息,所以,我原文搬q来了?/div>
  • Product Marketing Manager
  • Product Manager
  • Software Engineer
  • Software Engineer in Test
  • Quantitative Compensation Analyst
  • Engineering Manager
  • AdWords Associate

q篇Blog例D了Google用来面试下面q几个职位的面试题。很多不是很Ҏ(gu)回答Q不q都比较l典与变态,是GoogleQMicrosoftQAmazon之类的公司的风格。对于本文,我没有翻译,因ؓ(f)我相信,英文问题是最好的。不q对于有些问题,我做了一些注释,不一定对Q但希望对你有帮助启发。对于一些问题,如果你百思不得其解,可以Google一下,StackOverflow或是Wikipedia上可能会(x)l你非常全面的答案?/p>

Product Marketing Manager
  • Why do you want to join Google?
  • What do you know about Google’s product and technology?
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them?
  • Have you ever used Google’s products? Gmail?
  • What’s a creative way of marketing Google’s brand name and product?
  • If you are the product marketing manager for Google’s Gmail product, how do you plan to market it so as to achieve 100 million customers in 6 months?
  • How much money you think Google makes daily from Gmail ads?
  • Name a piece of technology you’ve read about recently. Now tell me your own creative execution for an ad for that product.
  • Say an advertiser makes $0.10 every time someone clicks on their ad. Only 20% of people who visit the site click on their ad. How many people need to visit the site for the advertiser to make $20?
  • Estimate the number of students who are college seniors, attend four-year schools, and graduate with a job in the United States every year.
Product Manager
  • How would you boost the GMail subscription base?
  • What is the most efficient way to sort a million integers?  Q陈皓:(x)merge sortQ?
  • How would you re-position Google’s offerings to counteract competitive threats from Microsoft?
  • How many golf balls can fit in a school bus? Q陈皓:(x)q种题一般来说是考你的解题思\的,注意Q你不能单纯地把高尔夫球当成一个小立方体,其是一个圆球,堆v来的时候应该是错开的——也是三个盔R的球的圆心是个等边三角ŞQ?
  • You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?
  • How much should you charge to wash all the windows in Seattle?
  • How would you find out if a machine’s stack grows up or down in memory?
  • Explain a database in three sentences to your eight-year-old nephew. Q陈皓:(x)用三句话?岁的侄子解释什么是数据库,考你的表达能力了Q?
  • How many times a day does a clock’s hands overlap?Q陈皓:(x)l典的时钟问题)
  • You have to get from point A to point B. You don’t know if you can get there. What would you do?
  • Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval? Q陈皓:(x)很不错的一道题Q不要以为分cL询很Ҏ(gu)Q想惛_书馆图书的分cL询问题吧。另外,你处x如何在你在你的衣柜里实现一个相当于Hash表或是一个Tree之类的数据结构)
  • Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens? Q陈皓:(x)q个问题很有限制U,哈哈Q非常搞的一个问题,注意wife们的递归Q这cȝ问题是经典的分布式通讯问题Q上|搜 一搜吧。)
  • In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?Q陈皓:(x)W一反应是——这个国家是中国。一个概率问题,其实Q无Z怎么生,50%的概率是永远不变的。)
  • If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?
  • 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!)
  • Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?Q陈皓:(x)l典的过桥问题)
  • You are at a party with a friend and 10 people are present including you and the friend. your friend makes you a wager that for every person you find that has the same birthday as you, you get $1; for every person he finds that does not have the same birthday as you, he gets $2. would you accept the wager?
  • How many piano tuners are there in the entire world?
  • You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighings?Q陈皓:(x)l典的称重问题。这L(fng)问题花样很多Q不q都不难回答Q?
  • You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)
  • You are given 2 eggs. You have access to a 100-story building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eggs are identical. You need to figure out the highest floor of a 100-story building an egg can be dropped without breaking. The question is how many drops you need to make. You are allowed to break 2 eggs in the process. Q陈皓:(x)?的倍数的楼层开始扔Q比?Q?Q?Q?2…..Q如果鸡蛋在3n层碎了,那到?n-1层扔W二个鸡蛋,如果没碎Q则最高不楼层ؓ(f)3n-1Q否则ؓ(f)3n-2Q?
  • Describe a technical problem you had and how you solved it.
  • How would you design a simple search engine?
  • Design an evacuation plan for San Francisco.
  • There’s a latency problem in South Africa. Diagnose it. Q陈皓:(x)q个问题完全是在考你的解决问题的能力。没有明的{案。不q,解决性能问题的第一步通常是找出瓶颈,扄颈有很多U方法,工具Q二分查Q时间记录等{。)
  • What are three long term challenges facing Google?
  • Name three non-Google websites that you visit often and like. What do you like about the user interface and design? Choose one of the three sites and comment on what new feature or project you would work on. How would you design it?
  • If there is only one elevator in the building, how would you change the design? How about if there are only two elevators in the building? Q陈皓:(x)l典的电(sh)梯设计问题,q种问题千变万化Q主要是考你的设计能力和需求变化的适变能力Q与此相似的是酒店订房系l。)
  • How many vacuum’s are made per year in USA?
Software Engineer
  • Why are manhole covers round? Q陈皓:(x)Z么下水井盖是圆的Q这是有NU答案的Q上Wiki看看吧)
  • What is the difference between a mutex and a semaphore? Which one would you use to protect access to an increment operation?
  • A man pushed his car to a hotel and lost his fortune. What happened? Q陈皓:(x)脑筋急{弯?他在玩大富翁游戏Q!Q)
  • Explain the significance of “dead beef”.Q陈皓:(x)要是你看到的?6q制 DEAD BEEFQ你?x)觉得这是什么?IPv6的地址Q)
  • Write a C program which measures the the speed of a context switch on a UNIX/Linux system.
  • Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.Q陈皓:(x)上StackOverflow看看吧,l典的问题)
  • Describe the algorithm for a depth-first graph traversal.
  • Design a class library for writing card games. Q陈皓:(x)用一pd的类来设计一个扑克游戏,设计题)
  • You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?Q陈皓:(x)协议+数字加密Q我试想了一个,U条上可以这样写Q?#8220;BobQ请把我的手机号以MD5法加密后的字符Ԍ比对下面的字W串——XXXXXXQ它们是一L(fng)吗?”Q?
  • How are cookies passed in the HTTP protocol?
  • Design the SQL database tables for a car rental database.
  • Write a regular expression which matches a email address. Q陈皓:(x)上StackOverflow查相当的问题吧。)
  • Write a function f(a, b) which takes two character string arguments and returns a string containing only the characters found in both strings in the order of a. Write a version which is order N-squared and one which is order N.Q陈皓:(x)法题,不难Q不说了。一个O(n^2)和一个O(n)的算法复杂度Q?
  • You are given a the source to a application which is crashing when run. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C standard library. What programming errors could be causing this crash? How would you test each one? Q陈皓:(x)和随机数有关p?或是旉Q)
  • Explain how congestion control works in the TCP protocol.
  • In Java, what is the difference between final, finally, and finalize?
  • What is multithreaded programming? What is a deadlock?
  • Write a function (with helper functions if needed) called to Excel that takes an excel column value (A,B,C,D…AA,AB,AC,… AAA..) and returns a corresponding integer value (A=1,B=2,… AA=26..).
  • You have a stream of infinite queries (ie: real time Google search queries that people are entering). Describe how you would go about finding a good estimate of 1000 samples from this never ending set of data and then write code for it.
  • Tree search algorithms. Write BFS and DFS code, explain run time and space requirements. Modify the code to handle trees with weighted edges and loops with BFS and DFS, make the code print out path to goal state.
  • You are given a list of numbers. When you reach the end of the list you will come back to the beginning of the list (a circular list). Write the most efficient algorithm to find the minimum # in this list. Find any given # in the list. The numbers in the list are always increasing but you don’t know where the circular list begins, ie: 38, 40, 55, 89, 6, 13, 20, 23, 36. Q陈皓:(x)循环排序数组的二分查N题)
  • Describe the data structure that is used to manage memory. (stack)
  • What’s the difference between local and global variables?
  • If you have 1 million integers, how would you sort them efficiently? (modify a specific sorting algorithm to solve this)
  • In Java, what is the difference between static, final, and const. (if you don’t know Java they will ask something similar for C or C++).
  • Talk about your class projects or work projects (pick something easy)… then describe how you could make them more efficient (in terms of algorithms).
  • Suppose you have an NxN matrix of positive and negative integers. Write some code that finds the sub-matrix with the maximum sum of its elements.Q陈皓:(x)以前见过一l数l的q个问题Q现在是二维的。感觉应该是把二l的W一行的最大和的区间算出来Q然后再在这个基之上q行二维的分析。思\应该是这个,不过具体的算法还需要想一惻I
  • Write some code to reverse a string.
  • Implement division (without using the divide operator, obviously).Q陈皓:(x)想一x除法的q程。)
  • Write some code to find all permutations of the letters in a particular string.
  • What method would you use to look up a word in a dictionary? Q陈皓:(x)使用排序Q哈希,?wi)等法和数据结构?
  • Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?
  • You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you fine the ball that is heavier by using a balance and only two weighings?
  • What is the C-language command for opening a connection with a foreign host over the internet?
  • Design and describe a system/application that will most efficiently produce a report of the top 1 million Google search requests. These are the particulars: 1) You are given 12 servers to work with. They are all dual-processor machines with 4Gb of RAM, 4x400GB hard drives and networked together.(Basically, nothing more than high-end PC’s) 2) The log data has already been cleaned for you. It consists of 100 Billion log lines, broken down into 12 320 GB files of 40-byte search terms per line. 3) You can use only custom written applications or available free open-source software.
  • There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1]. Solve it without division operator and in O(n).Q陈皓:(x)注意其不能用除法。算法思\是这L(fng)Q把output[i]=a[i]左边的乘U?x a[i]双的乘U,所以,我们可以分两个@环,W一ơ先把A[i]左边的乘U放在Output[i]中,W二ơ把A[i]双的乘U算出来。我们先看第一ơ的循环Q用P代篏U的方式Q代码如下:(x)for(r=1; i=0; i<n-1; i++){ Output[i]=r; r*=a[i]; }Q看明白了吧。第二次的@环我׃说了Q方法一L(fng)。)
  • There is a linked list of numbers of length N. N is very large and you don’t know N. You have to write a function that will return k random numbers from the list. Numbers should be completely random. Hint: 1. Use random function rand() (returns a number between 0 and 1) and irand() (return either 0 or 1) 2. It should be done in O(n).Q陈皓:(x)本题其实不难。在遍历链表的同时一边生成随机数Q一边记录最大的K个随机数和其链接地址。)
  • Find or determine non existence of a number in a sorted list of N numbers where the numbers range over M, M>> N and N large enough to span multiple disks. Algorithm to beat O(log n) bonus points for constant time algorithm.Q陈皓:(x)使用bitmapQ如果一个长整Ş?4位,那么我们可以使用M/64个bitmapQ?
  • You are given a game of Tic Tac Toe. You have to write a function in which you pass the whole game and name of a player. The function will return whether the player has won the game or not. First you to decide which data structure you will use for the game. You need to tell the algorithm first and then need to write the code. Note: Some position may be blank in the game?So your data structure should consider this condition also.
  • You are given an array [a1 To an] and we have to construct another array [b1 To bn] where bi = a1*a2*…*an/ai. you are allowed to use only constant space and the time complexity is O(n). No divisions are allowed.Q陈皓:(x)前面说过了)
  • How do you put a Binary Search Tree in an array in a efficient manner. Hint :: If the node is stored at the ith position and its children are at 2i and 2i+1(I mean level order wise)Its not the most efficient way.Q陈皓:(x)按顺序遍历树(wi)Q?
  • How do you find out the fifth maximum element in an Binary Search Tree in efficient manner. Note: You should not use use any extra space. i.e sorting Binary Search Tree and storing the results in an array and listing out the fifth element.
  • Given a Data Structure having first n integers and next n chars. A = i1 i2 i3 … iN c1 c2 c3 … cN.Write an in-place algorithm to rearrange the elements of the array ass A = i1 c1 i2 c2 … in cnQ陈皓:(x)q个法其实是从中间开始交换元素,代码Qfor(i=n-1; i>1; i++) {  for(j=i; j<2*n-i; j+=2) { swap(a[j], a[j+1]); } }Q不好意思写在同一行上了。)
  • Given two sequences of items, find the items whose absolute number increases or decreases the most when comparing one sequence with the other by reading the sequence only once.
  • Given That One of the strings is very very long , and the other one could be of various sizes. Windowing will result in O(N+M) solution but could it be better? May be NlogM or even better?
  • How many lines can be drawn in a 2D plane such that they are equidistant from 3 non-collinear points?
  • Let’s say you have to construct Google maps from scratch and guide a person standing on Gateway of India (Mumbai) to India Gate(Delhi). How do you do the same?
  • Given that you have one string of length N and M small strings of length L. How do you efficiently find the occurrence of each small string in the larger one?
  • Given a binary tree, programmatically you need to prove it is a binary search tree.
  • You are given a small sorted list of numbers, and a very very long sorted list of numbers – so long that it had to be put on a disk in different blocks. How would you find those short list numbers in the bigger one?
  • Suppose you have given N companies, and we want to eventually merge them into one big company. How many ways are theres to merge?
  • Given a file of 4 billion 32-bit integers, how to find one that appears at least twice? Q陈皓:(x)我能惛_的是拆分成若q个数l,排序Q然后一点点归ƈhQ?
  • Write a program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.Q陈皓:(x)你可能需要看看这文?a onclick="pageTracker._trackPageview('/outgoing/www.cs.rutgers.edu/_farach/pubs/FrequentStream.pdf?referer=');" target=_blank>Finding Frequent Items in Data StreamsQ?
  • Design a stack. We want to push, pop, and also, retrieve the minimum element in constant time.
  • Given a set of coin denominators, find the minimum number of coins to give a certain amount of change.Q陈皓:(x)你应该查看一下这文章:(x)Coin Change ProblemQ?
  • Given an array, i) find the longest continuous increasing subsequence. ii) find the longest increasing subsequence.Q陈皓:(x)q个题不难,O(n)法是边遍历边记录当前最大的q箋的长度。)
  • Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?
  • Write a function to find the middle node of a single link list. Q陈皓:(x)我能惛_的算法是——设|两个指针p1和p2Q每一ơ,p1C步,p2C步,q样Q当p1走到最后时Qp2在中间Q?
  • Given two binary trees, write a compare function to check if they are equal or not. Being equal means that they have the same value and same structure.Q陈皓:(x)q个很简单,使用递归法。)
  • Implement put/get methods of a fixed size cache with LRU replacement algorithm.
  • You are given with three sorted arrays ( in ascending order), you are required to find a triplet ( one element from each array) such that distance is minimum. Distance is defined like this : If a[i], b[j] and c[k] are three elements then distance=max(abs(a[i]-b[j]),abs(a[i]-c[k]),abs(b[j]-c[k]))” Please give a solution in O(n) time complexityQ陈皓:(x)三个指针Qa, b, c分别指向三个数组_(d)假设Qa[0]<b[0]<c[0]Q推qa直到a[i]>b[0]Q计?abs(a[i-1] – c[0])Q把l果保存在min中。现在情况变成找 a[i], b[0],c[0]Q重复上q过E,如果有一个新的值比min要小Q那取代现有的min。)
  • How does C++ deal with constructors and deconstructors of a class and its child class?
  • Write a function that flips the bits inside a byte (either in C++ or Java). Write an algorithm that take a list of n words, and an integer m, and retrieves the mth most frequent word in that list.
  • What’s 2 to the power of 64?
  • Given that you have one string of length N and M small strings of length L. How do you efficiently find the occurrence of each small string in the larger one? Q陈皓:(x)我能惛_的是——把那M个小字串排个序,然后遍历大字Ԍq在那M个字串中以二分取中的方式查找。)
  • How do you find out the fifth maximum element in an Binary Search Tree in efficient manner.
  • Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?
  • There is linked list of millions of node and you do not know the length of it. Write a function which will return a random number from the list.
  • You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?
  • How long it would take to sort 1 trillion numbers? Come up with a good estimate.
  • Order the functions in order of their asymptotic performance: 1) 2^n 2) n^100 3) n! 4) n^n
  • There are some data represented by(x,y,z). Now we want to find the Kth least data. We say (x1, y1, z1) > (x2, y2, z2) when value(x1, y1, z1) > value(x2, y2, z2) where value(x,y,z) = (2^x)*(3^y)*(5^z). Now we can not get it by calculating value(x,y,z) or through other indirect calculations as lg(value(x,y,z)). How to solve it?
  • How many degrees are there in the angle between the hour and minute hands of a clock when the time is a quarter past three?
  • Given an array whose elements are sorted, return the index of a the first occurrence of a specific integer. Do this in sub-linear time. I.e. do not just go through each element searching for that element.
  • Given two linked lists, return the intersection of the two lists: i.e. return a list containing only the elements that occur in both of the input lists. Q陈皓:(x)把第一个链表存入hash表,然后遍历W二个链表。不知道q没有更好的Ҏ(gu)。)
  • What’s the difference between a hashtable and a hashmap?
  • If a person dials a sequence of numbers on the telephone, what possible words/strings can be formed from the letters associated with those numbers?Q陈皓:(x)q个问题和美国的?sh)话有关p,大家可以试着想一下我们发短信的手机,按数字键出字母,一个组合的数学问题。)
  • How would you reverse the image on an n by n matrix where each pixel is represented by a bit?
  • Create a fast cached storage mechanism that, given a limitation on the amount of cache memory, will ensure that only the least recently used items are discarded when the cache memory is reached when inserting a new item. It supports 2 functions: String get(T t) and void put(String k, T t).
  • Create a cost model that allows Google to make purchasing decisions on to compare the cost of purchasing more RAM memory for their servers vs. buying more disk space.
  • Design an algorithm to play a game of Frogger and then code the solution. The object of the game is to direct a frog to avoid cars while crossing a busy road. You may represent a road lane via an array. Generalize the solution for an N-lane road.
  • What sort would you use if you had a large data set on disk and a small amount of ram to work with?
  • What sort would you use if you required tight max time bounds and wanted highly regular performance.
  • How would you store 1 million phone numbers?Q陈皓:(x)试想?sh)话是有区段的,可以把区D늻一保存QFlyweight设计模式Q?
  • Design a 2D dungeon crawling game. It must allow for various items in the maze – walls, objects, and computer-controlled characters. (The focus was on the class structures, and how to optimize the experience for the user as s/he travels through the dungeon.)
  • What is the size of the C structure below on a 32-bit system? On a 64-bit? Q陈皓:(x)注意~译器的寚wQ?

struct foo {

char a;
char* b;
};
Software Engineer in Test
  • Efficiently implement 3 stacks in a single array.
  • Given an array of integers which is circularly sorted, how do you find a given integer.
  • Write a program to find depth of binary search tree without using recursion.
  • Find the maximum rectangle (in terms of area) under a histogram in linear time.
  • Most phones now have full keyboards. Before there there three letters mapped to a number button. Describe how you would go about implementing spelling and word suggestions as people type.
  • Describe recursive mergesort and its runtime. Write an iterative version in C++/Java/Python.
  • How would you determine if someone has won a game of tic-tac-toe on a board of any size?
  • Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division.
  • Create a cache with fast look up that only stores the N most recently accessed items.
  • How to design a search engine? If each document contains a set of keywords, and is associated with a numeric attribute, how to build indices?
  • Given two files that has list of words (one per line), write a program to show the intersection.
  • What kind of data structure would you use to index annagrams of words? e.g. if there exists the word “top” in the database, the query for “pot” should list that.
Quantitative Compensation Analyst
  • What is the yearly standard deviation of a stock given the monthly standard deviation?
  • How many resumes does Google receive each year for software engineering?
  • Anywhere in the world, where would you open up a new Google office and how would you figure out compensation for all the employees at this new office?
  • What is the probability of breaking a stick into 3 pieces and forming a triangle?
Engineering Manager
  • You’re the captain of a pirate ship, and your crew gets to vote on how the gold is divided up. If fewer than half of the pirates agree with you, you die. How do you recommend apportioning the gold in such a way that you get a good share of the booty, but still survive?
AdWords Associate
  • How would you work with an advertiser who was not seeing the benefits of the AdWords relationship due to poor conversions?
  • How would you deal with an angry or frustrated advertisers on the phone?
Sources

Q全文完Q?/p>



]]>googleW试?/title><link>http://www.shnenglu.com/Walker/articles/136335.html</link><dc:creator>漫步者?amp;…?K?/dc:creator><author>漫步者?amp;…?K?/author><pubDate>Mon, 13 Dec 2010 14:01:00 GMT</pubDate><guid>http://www.shnenglu.com/Walker/articles/136335.html</guid><description><![CDATA[<h1 class=postTitle><a id=ctl04_TitleUrl class=postTitle2 ><font color=#399ab2>googleW试题收?/font></a> </h1> <div id="xfoukbf" class=clear></div> <div id="bnwmjgb" class=postBody> <p><img border=0 alt="" src="http://images.cnblogs.com/cnblogs_com/chio/google1.jpg" width=613 height=496 twffan="done"></p> </div> <br>1. 异或<br>1^1=0<br>0^0=0<br>1^0=1<br>0^1=1<br><br>2. 斐L那契数列(Fibonacci)<br><br>3.存储I间上不h优势<br><br>4. ?#8220;d?#8221;<br>T(n)=25T(n/5) + n<font size=2><sup>2</sup><br><br></font>a=25  b=5   f(n)=n<font size=2><sup>2</sup><br></font>log<sub><font size=2>b</font></sub>a=2<br><br>n<sup><font size=2>log</font><sub><font size=1>b</font></sub><font size=2>a</font></sup>与f(n)比较Q?相等<br>则时间复杂度为O(n<sup><font size=2>2</font></sup>logn)<br><br><img border=0 alt="" src="http://images.cnblogs.com/cnblogs_com/chio/google2.jpg" twffan="done"><br><br>1. <br> <p> </p> <p>2. <br><br>3</p> <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px" class=code twffan="done"><span style="COLOR: #000000" twffan="done">#include </span><span style="COLOR: #000000" twffan="done"><</span><span style="COLOR: #000000" twffan="done">iostream</span><span style="COLOR: #000000" twffan="done">></span><span style="COLOR: #000000" twffan="done"><br>#include </span><span style="COLOR: #000000" twffan="done"><</span><span style="COLOR: #000000" twffan="done">limits</span><span style="COLOR: #000000" twffan="done">></span><span style="COLOR: #000000" twffan="done"><br></span><span style="COLOR: #0000ff" twffan="done">using</span><span style="COLOR: #000000" twffan="done"> </span><span style="COLOR: #0000ff" twffan="done">namespace</span><span style="COLOR: #000000" twffan="done"> std;<br><br></span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> foo(</span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> arr[], </span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> n)<br>{<br>    </span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> max </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done"> numeric_limits</span><span style="COLOR: #000000" twffan="done"><</span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done">></span><span style="COLOR: #000000" twffan="done">::min();<br>    </span><span style="COLOR: #008000" twffan="done">//</span><span style="COLOR: #008000" twffan="done">cout << max << "\n";</span><span style="COLOR: #008000" twffan="done"><br></span><span style="COLOR: #000000" twffan="done">    </span><span style="COLOR: #0000ff" twffan="done">for</span><span style="COLOR: #000000" twffan="done">(</span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> i </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done"> </span><span style="COLOR: #000000" twffan="done">0</span><span style="COLOR: #000000" twffan="done">; i </span><span style="COLOR: #000000" twffan="done"><</span><span style="COLOR: #000000" twffan="done"> n; i</span><span style="COLOR: #000000" twffan="done">++</span><span style="COLOR: #000000" twffan="done">)<br>    {<br>        </span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> product </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done"> </span><span style="COLOR: #000000" twffan="done">1</span><span style="COLOR: #000000" twffan="done">;<br>        </span><span style="COLOR: #0000ff" twffan="done">for</span><span style="COLOR: #000000" twffan="done">(</span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> j </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done">0</span><span style="COLOR: #000000" twffan="done">; j </span><span style="COLOR: #000000" twffan="done"><</span><span style="COLOR: #000000" twffan="done"> n; j</span><span style="COLOR: #000000" twffan="done">++</span><span style="COLOR: #000000" twffan="done">)<br>        {<br>            </span><span style="COLOR: #0000ff" twffan="done">if</span><span style="COLOR: #000000" twffan="done">(j </span><span style="COLOR: #000000" twffan="done">!=</span><span style="COLOR: #000000" twffan="done"> i )<br>                product </span><span style="COLOR: #000000" twffan="done">*=</span><span style="COLOR: #000000" twffan="done"> arr[j];            <br>        }<br>        max </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done"> product </span><span style="COLOR: #000000" twffan="done">></span><span style="COLOR: #000000" twffan="done"> max </span><span style="COLOR: #000000" twffan="done">?</span><span style="COLOR: #000000" twffan="done"> product : max;<br>    }<br><br>    </span><span style="COLOR: #0000ff" twffan="done">return</span><span style="COLOR: #000000" twffan="done"> max;<br>}<br><br></span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> main()<br>{<br>    </span><span style="COLOR: #0000ff" twffan="done">int</span><span style="COLOR: #000000" twffan="done"> arr[</span><span style="COLOR: #000000" twffan="done">4</span><span style="COLOR: #000000" twffan="done">] </span><span style="COLOR: #000000" twffan="done">=</span><span style="COLOR: #000000" twffan="done"> { </span><span style="COLOR: #000000" twffan="done">-</span><span style="COLOR: #000000" twffan="done">1</span><span style="COLOR: #000000" twffan="done">, </span><span style="COLOR: #000000" twffan="done">-</span><span style="COLOR: #000000" twffan="done">5</span><span style="COLOR: #000000" twffan="done">, </span><span style="COLOR: #000000" twffan="done">2</span><span style="COLOR: #000000" twffan="done">, </span><span style="COLOR: #000000" twffan="done">3</span><span style="COLOR: #000000" twffan="done">};<br>    cout </span><span style="COLOR: #000000" twffan="done"><<</span><span style="COLOR: #000000" twffan="done"> foo(arr, </span><span style="COLOR: #000000" twffan="done">4</span><span style="COLOR: #000000" twffan="done">) </span><span style="COLOR: #000000" twffan="done"><<</span><span style="COLOR: #000000" twffan="done"> </span><span style="COLOR: #000000" twffan="done">"</span><span style="COLOR: #000000" twffan="done">\n</span><span style="COLOR: #000000" twffan="done">"</span><span style="COLOR: #000000" twffan="done">;<br><br>    </span><span style="COLOR: #0000ff" twffan="done">return</span><span style="COLOR: #000000" twffan="done"> </span><span style="COLOR: #000000" twffan="done">0</span><span style="COLOR: #000000" twffan="done">;<br>}</span></div> <p>旉复杂度分?<br>d的操作步?n*{[n+(n-1)]+1}=2n<font size=2><sup>2</sup><br></font>旉复杂度ؓ(f)O(n2)<br><br>I间复杂度ؓ(f)O(1)  4*sizeof(int)<br><br><br>改进法Q?br><br>GoogleW试集锦<br>GoogleW试集锦<br> <br>选择?三道法?br>选择题没什么难?nbsp; 最后一道考的数据库用什么存储结构不?x)做。?br>法?br>W一题没什么好?br>W二题可?br></p> <p>GoogleW试集锦<br>GoogleW试集锦<br> <br>选择?三道法?br>选择题没什么难?nbsp; 最后一道考的数据库用什么存储结构不?x)做。?br>法?br>W一题没什么好?br>W二题可破坏一个数lA[0..N-1]的条件下使用最的内存判断是否存在相同的元?br>   我的做法是堆排序  旉O(NlogN) I间O(1) 复杂度上来看应该最优了<br>W三题已知每个点的父节点Q求q棵?wi)的最大独立集<br>   用递归求解  cM动态规?nbsp; 但是不存在重叠子状?nbsp; l典法问题?br>   预处理每个节点的子节点存在一张表?br>   旉O(NQ空间O(NQ?br>大家做的l果是这样吗Q?br>发信? 饮水思源 (2006q?0?1?3:06:04 星期?, 站内信g<br>开章明义,我是个废人,上来U攒rp了?br>在宣讲会(x)的时候,听旁边的师姐说上只招两个职位每个职位只招一个h?br>现在后?zhn)只选了北京和上L(fng)SWE了?br>不过反正……也不指望了。。?/p> <p>W试题目Q?道单?3道问{?br>旉Q?00分钟<br>我做的是B南?br>单选题Q?br>1Q求两个二进制数的异或|基本上学q一点计机的东西的人都能对的题目。?br>2Q不记得了。。也是不需要思考的题目。?br>3Q大概是如下的函敎ͼ(x)<br>int someFunc(int x){<br>    if (x == 0)<br>        return 0;<br>    else<br>        return x + someFunc(x - 1);<br>}<br>问这个计的是什么。。?br>4Q不记得了。。不需要思考吧。?br>5Q不记得了。。不需要思考吧。?br>6Q参?Q?Q?。?br>7Q似乎需要思考一下。?br>8Q问链表l构和数l相比的优势不包括哪,<br>包括Q?br>插入的时?br>删除的时?br>存储I间<br>剩下两个不记得了。?br>9Q如下函敎ͼ(x)<br>T(x) = 1 (x <= 1)<br>T(n) = 25 T(n/5) + n^2<br>问T(n)随n的增ѝ?br>选项大概是这L(fng)Q?br>O(n^2)QO(n^2logn){等的。?br>问答Q?br>1Q写两个N*N的矩늚乘法Q给ZC的格式,你可以选择你喜Ƣ的语言d。?br>int* multi(int* a1, int* a2, int N){<br>}<br>2Q寻找一个单向链表的中项Q如果存在两个则q回前一个。给ZC的格式,同样你可<br>以选择。。。?br>struct {<br>    Node* next;<br>    int value;<br>} Node;<br>Node* someFunc(Node* head){<br>}<br>3Q给一个长度ؓ(f)n的整数数l,只允许用乘法不允许用除法Q计Q?n-1)个数的组?br>乘积中最大的一l。。。写出算法的时空复杂度?br>psQ怀疑这道题目出错啦。。虽然我也做错了。。。。。?br>一些补充:(x)<br>1Q问{的W一题是google上学?intern的大题原题;<br>2Qgoogle很喜Ƣ考链表,无论intern的面试以?qing)两ơ的W试都有q样的题目;<br>3Qgoogle一般大题第三道都是写算法的时空复杂度;<br>4Q选择题基本上偏简单,但是要做得准率高似乎ƈ不那么容易;<br>5Q根据传aQ小道消息,Z亦云以及(qing)以讹传讹Qgoogle的高速审h{来源于审卷?br>以选择题ؓ(f)主,如果你全对啦Q那么恭喜你pass啦;如果你错了好几道Q那么下ơ努?br>吧,如果q有下次。。。大题基本是做参考的。。?br>6Q选择题很多记不清了,因ؓ(f)一遍做下来的,回去随便扫了两眼。。。加上过了这几个<br>时Q记不得了。希望大家补充修正以?qing)修攏V。?br>7Qgoogle?x)?1号开?天内发面试通知Q据道消息{等Q有四轮面试。bless大家~~ <br> <br> <br>输入a_1,   a_2,   ...,   a_n,   b_1,   b_2,   ...,   b_nQ如何在O(n)的时_(d)用O(1)的空_(d)<br>这个序列顺序改为a_1,   b_1,   ...,   a_n,   b_n?br>q个问题在瀚v星云上跟Z好几十的跟帖Q看看大家有没有什么好的解法!Q! <br> </p> <p>晚上是google的校园宣讲会(x)<br>先前q没有投历,但是q是奔了?br>google的hrjj看v来仿?jng)没有ibm的那么动人,但却很亲?br>五点半左叛_始,开始前那个hrjj放了些google员工自己拍的mvQ?br>比较有意?br>之后是一个做技术的L(fng)如数家珍的介lgoogle做的东西<br>之所以称?#8220;L(fng)”主要感觉他很学生气。。。讲话ƈ没有那些很商业的调度气氛的东?br>很理想主义,呵呵Q虽然听的很多h打瞌?br>他L说google是个很理想主义的公司Q虽然ؓ(f)了生存不得不做一些商业化的事情,但是Qgoogle做很多事情都是因得有做的价值ƈ且要做好Q所以有了googleprint,googleearth,{等<br>不过Qgoogle仿佛(jng)是一个需要聪明h的公司,接下来的W试应证了这一?br>内容很少Q甚至简单,选择题可能是送分的,大概10来道Qƈ不难Q算些东西,q有一点点E序斚w的基概念Q后面是三个法设计题?br>W一个,深拷贝一个二叉树(wi)。我不明白这道题的动机是什么,我最后很搓得用了递归Q虽然明知道q样很耗,可是实在想不h非递归法怎么个写法了?br>W二个,把输入数l随机分配到一个新的数l上Q每个数都完全对应一个随机的位置Q当Ӟ随即产生函数是提供了的。这个题我想了很久,冲突的时候怎么办?散列Q但是那栯是随机的吗?<br>W三个,很ft。居然是C语言的一个作业题。N个h排成圈,从第一个h开始,LQ隔一个hQ去掉下一个,以此cLQ要求出最后出局的那个h的位|。ƈ且,要求分析法的时间、空间复杂度。我感觉q个题表面简单,实际对算法的优化要求很高。一个是I间复杂度,一个是旉复杂度,只是不知道做C么程度算是极好?br>仿佛(jng)q种cd的考试Q大家差不多都能{完Q只是如何才能与众不同却让h伤脑{?br>回来后对google的印象变得很好,臛_感觉他们真的是需要hQ而不是一个螺丝钉。。?<br> <br> </p> <p>昨天Q参加了Google春季实习(fn)工程师的招聘W试。这是进入大学以来参加的W一ơ笔试?br>可以_(d)q次W试也让我更明确了我的学?fn)方向。学?fn)什么技能不重要Q重要的是要有扎实基Q数据结构,c++语言{,都要扎实的掌握,不可有丝毫的马虎。于是,渐渐开始后(zhn)了Q后(zhn)自己对基础知识没有学好Q却又一天到晚想着要学什么什么东西,q真是丢了西瓜捡了芝麻,一点便宜都没有占到啊?br>q记得昨天的W试Q第一题是有关位操作的Q很单。接下来两题是讲const指针的,q便是我的一个薄qQ以前一直都没有学好。首先,constchar*p="abcde"Q那么,p指向的内Ҏ(gu)不可变得Q即不能改变*p的|但是Qp却是可变的,卛_以这么操作:(x)p=“12345”Q或者p=newchar[10]Q等{;另外Qchar*constp="abcde"Q则表示q是一个指针常量,即p不能指向另外的地址Q但是,p指向的内Ҏ(gu)可以改变的;q有一个就是常量指针常量,constchar*constpQ它是指向常量的帔R指针Q若初始化的时候,p指向的是一个变量,那么Q不能用指针操作来改变变量的|例如Qinta=0;constint*constp=&a;*p=1;//q句或是错误的,但是Q可以直接给变量赋|即a=1Q是可以的?br>接下来几题涉?qing)了法分析的一些东西,然后是涉?qing)语法分析的正则表达式什么的Q这个因为没学过~译Q也׃太懂了。接下来是考了抖动。什么是抖动Q所谓抖动,主要是由于页面交换过于频J,而导致时间浪费太多的现象。特别的Q在虚拟内存技术下Q若工作集大选的不合适的话,׃(x)有频J的换入换出Q而我们知道,盘的读写是需要花费大量时间的Q这P导致了某进E等待的旉比实际运行的旉多的多?br>接下来的大题是编E题和算法题Q前两题都挺单的Q第一题要求完成双向链表的dl点Q第二题要求比较两字W串的字W出现频率;W三题是个算法题Q基本意思很单,但是Q要扑ֈ一个好的算法却需要一定的思考能力,具体题目已经C太清了?br>MQ这ơ笔试,虽然说从一开始所q心态就是见识见识,没有奢求什么,只是惌个温暖的象牙塔,走到外面q个p世界来看看情形。一切都需攑ּ。走了一遭才发现Q不要d高处看,基础扎实了,才能造v巴比伦塔?br> <br> <br>1.写程序判断是否字W串A里每个字W在A中出现的ơ数都大于在字符串B中出现的ơ数?br>注:(x)此题我是Ҏ(gu)个字W出现的ơ数分别l计Q然后比较。重复的字符重复l计比较Q所以效率很低。不知有什么好的改q方法?<br>2.对一个数lSQ求其中满要求的最大元素C。要求C满{式C=A*BQ其中A、B也是数组S中的元素。请用能惛_的最优算法,分析旉和空间复杂度。(用语a描述法Q不用写E序Q?br>注:(x)q个题我当时做的Ҏ(gu)在时间上要用o(n^3)Q事后想Z个o(n^2logn)的方法。不知有没有更好的方法?br> <br> <br>传说中有QgoogleW试很变态,题目希奇古怪;google题目比较基础单?br>l于得于一见?br>晚上q完zL去,到的时候已l?点左叟뀂在二教已经没有IZ座位Q无赖多{了20多分钟才安排了一个新的教室?br>发题Q答南?br>整体感觉是比较基础Q没有什么很隄题目Q除最后一题目以外?br>选择题目9个,比较基础?br>W一题,相对比较单,递归<br>W二题,基本是看是否对函数效率是否有概念。似乎也跟动态规划的记录法有点相g处?br>最后一题目回想h实在惭愧Q其实还是题目没有怎么L。嗨Q?br>以下是科苑上Q看到的解法。惭愧惭?br>W一和第二应该是不错的选择Q?br>特别是第二种Ҏ(gu)Q?/p> <p>发信?oasis(l洲),信区:SISE2004702<br>标题:W试最后一题想到的几种解法<br>发信?BBSU苑星空?WedOct1803:24:342006),站内<br>反正也晚了,q脆再折腾一?x)儿?br>题目Qn个点l成的无向图Q对于Q意给出的两点Q判断其是否有长度ؓ(f)K的通\?br>分析Q无向图是允许有环存在的Q也允许两点间有多条边,长度为K是指从一个点<br>Ud到相?c)q样q程的次数。比如AB两点盔RQ那么A-B-A-B是长度?的通\?br>解法一Q直接利用图Z的一个定理,L矩阵U的Kơ方后所得矩늚(i,j)元素<br>即ؓ(f)原无向图中i,j两点之间长度为K的通\数量。因此复杂度只需要对U^K分析?br>׃U^2的时间复杂度为O(n^3)Q(q里使用了传l矩阵乘法,不过即用strassan<br>Ҏ(gu)也依然是O(n^(2+e))Q其?技巧,不需要去依次的乘Q否则的话需要K-1ơ矩阵乘法,可以从U^2Q算出U^4Q?br>依此cLQ因此ȝ旉复杂度ؓ(f)O(n^3*lgK)。空间复杂度不细qO(n^2)?br>评论一Q细心的Z(x)注意到这L(fng)解法其实比题目的要求要强Q因为题目中只是?br>求出Ll定的两炚wK通\数目Q而上q做法,则是把所有的两点l合都求出来<br>了。因此还应该存在着改进的算法在O(n^2)q个旉复杂度别?br>解法二:(x)q是看水木上一个网友的解法Q我重写成下面这P(x)设所l的两点为A、B?br>那么首先把A的所有相?c)全部攑օU集合中,接着对之前放入U中的点i分别求出其相<br>?c)Qƈ它们放入U中(而原先的点i本n则从集合中事先去除)。这样做qKơ后Q?br>看队列中是否有B炏V若有则表明存在着长度为K的通\。由于每ơ寻N接点的次?br>不超qn^2Q而要q行Kơ,因此旉复杂度ؓ(f)O(n^2*K)Q空间复杂度为O(n)?br>评论二:(x)和解法一相比Q从n^3*lgK变ؓ(f)了n^2*KQ也是n*lgK与K之间的差别,若n=k<br>的话Q也p明后者比前者快了lgK倍?br>解法三:(x)从A到B利用深度优先遍历Q找出每一条AB间的路径Q其中没有点重复l过?br>Ҏ(gu)一条这L(fng)路径q行分析Q?br>若长?gt;KQ该路径不可能满I<br>若长?KQ则已满I<br>若长度一ơ加一Q。若无环Q则看K-当前路径长度Q若该gؓ(f)偶数Q则可以在该路径上的某两<br>个邻接点上来回的重复C而满求(每来回走一ơ加二)。其他情况,无法满?br>׃得到法的时间和I间复杂度均为O(n^2)Q?br>评论三:(x)旉复杂度很可能不是O(n^2)Q因ZA到B上找出每一条AB间的单\径,?br>于存在着重复边和环的情况Q多半就不是单的深度遍历的O(n^2)了,具体是多我?br>说不清。笔试里我用的这个方法,现在感觉挺玄。。?<br> </p> <p>?006-10-17?br>      今晚GoogleW试Q也是本人的“处女W?#8221;Qh׃h啊Q开始Google技术ȝ宣讲Ӟ有位义愤填膺的老兄Q抓住提问时_(d)强烈指责Google搜烦不了“南京大屠杀”{?#8220;不公?#8221;现象。唉Q勇气和爱国M情感可嘉啊,只可惜ؓ(f)什么不弄清情况p来ؕ说话呢?<br>      W试的h数比Google预想的多?-3倍,题目不是很难Q似乎都是计机专业的基课。不q可惜,我不是计机专业的,很多题目只是凭自qE经验写的,估计希望不会(x)太大。但是心情还不错Q因为本来就没有抱太大希望,而且GoogleW试且不是很难Q就不必对其他公司笔试有太大心里压力了?br>      有几道题目给出来Q喜ƢC的来看看Q?br>      int main()<br>      {const char* p = "12345";<br>       const char **q = &p;<br>       *q = "abcde";<br>      const char *s = ++p;<br>      p = "XYZWVU";<br>      printf("%c\n", *++s);<br>     }<br>   求输出结果?br>---------------------------------------------<br>   最后一道题Q?br>   n个节点的无向图,判断L两点之间是否有长度ؓ(f)K的通\。写出算法思\Qƈl出你的法的时间和I间复杂度?br>--------------------------------------------<br>   上面一题答?#8220;c”Q因为p是指向常量的指针Q但P本n可以变化Q下面一题据说是L数学教程中的l典题型Q我没有上过Q只惛_深度遍历的方法?br> <br>google的魅力就不用词语形容?从晚上的人气可见一?准点赶到教七,却发现门口已l被人群l赌?google的工作h员一个劲地劝大家别进M,理由?Z安全":).也好,不用听开复同学的唠叨.回教三的路上,一打打的hq面而来,熟?zhn)?陌生?本校?外校?我彷?jng)到了麦?I梭在朝圣的人流? 但是念佛(jng)的h?成佛(jng)的却是寥?晚上肯定有四位数的申误?不过能有多少人登上幸q的快R?能突破个位数?所谓千军万马过独木?扑ַ?挺残?<br>  于我,d加笔?更多是一U体?选择google,权当是我对这家伟大的公司的一Ҏ(gu)意吧!<br>  在Y件上,我这L(fng)水^,恐怕连菜鸟也谈不上.那么g?光学?我的竞争力在哪里?不能不说,对于扑ַ?我是有所恐惧?现在的选择,也许不过是种逃避.<br>  昨天,zhengzheng说他改变L,准备工作?一赯的兄?又少了一?今天,simon说在犹U是否调整甌的方?因ؓ(f)他想以后q是q公司的.说v,5q的努力是否值得?未来也许只有上帝知道?<br>  乘着脑子q清?先把W试题记?<br>  9个选择?2个编E?1个算?选择?感觉比较基础,不知里面有没有设地雷?反正没啥印象?<br>  ~程1,打印二叉?实现语言不限,先后也不?<br>  ~程2,l定一个字W串数组,从中扑ևW一个只出现一ơ的字母.<br>  法?l定一个整数数l?从中切出一个连l片D?保证其元素和最?求最优算?分析旉和空间复杂度.  <br> </p> <p>?nbsp; ? GoogleW经<br>发信? 饮水思源 (2006q?0?1?3:06:04 星期?, 站内信g<br>开章明义,我是个废人,上来U攒rp了?br>在宣讲会(x)的时候,听旁边的师姐说上只招两个职位每个职位只招一个h?br>现在后?zhn)只选了北京和上L(fng)SWE了?br>不过反正……也不指望了。。?/p> <p>W试题目Q?道单?3道问{?br>旉Q?00分钟<br>我做的是B南?br>单选题Q?br>1Q求两个二进制数的异或|基本上学q一点计机的东西的人都能对的题目。?br>2Q不记得了。。也是不需要思考的题目。?br>3Q大概是如下的函敎ͼ(x)<br>int someFunc(int x){<br>    if (x == 0)<br>        return 0;<br>    else<br>        return x + someFunc(x - 1);<br>}<br>问这个计的是什么。。?br>4Q不记得了。。不需要思考吧。?br>5Q不记得了。。不需要思考吧。?br>6Q参?Q?Q?。?br>7Q似乎需要思考一下。?br>8Q问链表l构和数l相比的优势不包括哪,<br>包括Q?br>插入的时?br>删除的时?br>存储I间<br>剩下两个不记得了。?br>9Q如下函敎ͼ(x)<br>T(x) = 1 (x <= 1)<br>T(n) = 25 T(n/5) + n^2<br>问T(n)随n的增ѝ?br>选项大概是这L(fng)Q?br>O(n^2)QO(n^2logn){等的。?br> <br>问答Q?br>1Q写两个N*N的矩늚乘法Q给ZC的格式,你可以选择你喜Ƣ的语言d。?br>int* multi(int* a1, int* a2, int N){<br>}<br>2Q寻找一个单向链表的中项Q如果存在两个则q回前一个。给ZC的格式,同样你可<br>以选择。。。?br>struct {<br>    Node* next;<br>    int value;<br>} Node;<br>Node* someFunc(Node* head){<br>}<br>3Q给一个长度ؓ(f)n的整数数l,只允许用乘法不允许用除法Q计Q?n-1)个数的组?br>乘积中最大的一l。。。写出算法的时空复杂度?br>psQ怀疑这道题目出错啦。。虽然我也做错了。。。。。?br> <br> <br>一些补充:(x)<br>1Q问{的W一题是google上学?intern的大题原题;<br>2Qgoogle很喜Ƣ考链表,无论intern的面试以?qing)两ơ的W试都有q样的题目;<br>3Qgoogle一般大题第三道都是写算法的时空复杂度;<br>4Q选择题基本上偏简单,但是要做得准率高似乎ƈ不那么容易;<br>5Q根据传aQ小道消息,Z亦云以及(qing)以讹传讹Qgoogle的高速审h{来源于审卷?br>以选择题ؓ(f)主,如果你全对啦Q那么恭喜你pass啦;如果你错了好几道Q那么下ơ努?br>吧,如果q有下次。。。大题基本是做参考的。。?br>6Q选择题很多记不清了,因ؓ(f)一遍做下来的,回去随便扫了两眼。。。加上过了这几个<br>时Q记不得了。希望大家补充修正以?qing)修攏V。?br>7Qgoogle?x)?1号开?天内发面试通知Q据道消息{等Q有四轮面试。bless大家~~<br> </p> <p>google brainy test/exam 是传甚广的传说中的google ?1?GLAT 考试了?br>  10月底QGoogle在美国《麻省技术评论》、《LinuxJournal》、《Mensa》、《今日物理》等几本专业杂志上,刊登了一?Google实验室能力們֐试"?br>  试卷开_(d)蛊惑地写着"试试看!把答案寄回GoogleQ你有希望去Google总部参观Qƈ成ؓ(f)我们其中一??br>1. Solve this cryptic equation, realizing of<br>course that values for M and E could be<br>interchanged. No leading zeros are allowed.<br>WWWDOT - GOOGLE = DOTCOM<br>2. Write a haiku describing possible methods<br>for predicting search traffic seasonality.<br>3.<br>1<br>1 1<br>2 1<br>1 2 1 1<br>1 1 1 2 2 1<br>What is the next line?<br>4. You are in a maze of twisty little passages,<br>all alike. There is a dusty laptop here with a<br>weak wireless connection. There are dull,<br>lifeless gnomes strolling about. What dost<br>thou do?<br>A) Wander aimlessly, bumping into<br>obstacles until you are eaten by a grue.<br>B) Use the laptop as a digging device to<br>tunnel to the next level.<br>C) Play MPoRPG until the battery dies<br>along with your hopes.<br>D) Use the computer to map the nodes<br>of the maze and discover an exit path.<br>E) Email your resume to Google, tell the<br>lead gnome you quit and find yourself<br>in whole different world.<br>5. What’s broken with Unix?<br>How would you fix it?<br>6. On your first day at Google, you discover<br>that your cubicle mate wrote the textbook<br>you used as a primary resource in your first<br>year of graduate school. Do you:<br>A) Fawn obsequiously and ask if you<br>can have an autograph.<br>B) Sit perfectly still and use only soft<br>keystrokes to avoid disturbing her<br>concentration.<br>C) Leave her daily offerings of granola<br>and English toffee from the food bins.<br>D) Quote your favorite formula from the<br>textbook and explain how it’s now<br>your mantra.<br>E) Show her how example 17b could<br>have been solved with 34 fewer lines<br>of code.<br>7. Which of the following expresses Google?br>over-arching philosophy?<br>A) "I’m feeling lucky"<br>B) "Don’t be evil"<br>C) "Oh, I already fixed that"<br>D) "You should never be more than<br>50 feet from food"<br>E) All of the above<br>8. How many different ways can you color an<br>icosahedron with one of three colors on<br>each face?<br>What colors would you choose?<br>9. This space left intentionally blank. Please fill it<br>with something that improves upon emptiness.<br>10.On an infinite, two-dimensional, rectangular<br>lattice of 1-ohm resistors, what is the<br>resistance between two nodes that are a<br>knight’s move away?<br>11.It’s 2 PM on a sunny Sunday afternoon in the<br>Bay Area. You’re minutes from the Pacific<br>Ocean, redwood forest hiking trails and world<br>class cultural attractions. What do you do?<br>12.In your opinion, what is the most beautiful<br>math equation ever derived?<br>13. Which of the following is NOT an actual<br>interest group formed by Google employees?<br>A. Women’s basketball<br>B. Buffy fans<br>C. Cricketeers<br>D. Nobel winners<br>E. Wine club<br>14.What will be the next great improvement in<br>search technology?<br>15.What is the optimal size of a project team,<br>above which additional members do not<br>contribute productivity equivalent to the<br>percentage increase in the staff size?<br>A) 1<br>B) 3<br>C) 5<br>D) 11<br>E) 24<br>16.Given a ABC, how would you use only<br>a compass and straight edge to find a point P<br>such that s ABP, ACP and BCP have<br>equal perimeters? (Assume that ABC is<br>constructed so that a solution does exist.)<br>17.Consider a function which, for a given whole<br>number n, returns the number of ones required<br>when writing out all numbers between 0 and n.<br>For example, f(13)=6. Notice that f(1)=1. What<br>is the next largest n such that f(n)=n?<br>18.What’s the coolest hack you’ve ever written?<br>19.’Tis known in refined company, that choosing<br>K things out of N can be done in ways as<br>many as choosing N minus K from N: I pick K,<br>you the remaining.<br>Find though a cooler bijection, where you show<br>a knack uncanny, of your choices contain<br>all K of mine. Oh, for pedantry: let K be no more<br>than half N.<br>20.What number comes next in the sequence:<br>10, 9, 60, 90, 70, 66,?<br>A)96<br>B) 1000000000000000000000000000000000<br>0000000000000000000000000000000000<br>000000000000000000000000000000000<br>C) Either of the above<br>D) None of the above<br>21.In 29 words or fewer, describe what you<br>would strive to accomplish if you worked<br>at Google Labs.<br> <br> <br>Google惯用“整蛊?#8221; <br>  Google上一轮招聘,今年夏天刚结束?<br>  用的也是一?#8220;U学ȝ”看不懂的“整蛊?#8221;Q而且Q堂而皇之挂在硅谷各大地铁站上?月底Q??5c长的米色广告牌上,单单L(fng)“Q在‘e’的数列中所能找到的W一个十位数质数Q?com”Q没有公司名也没有Q何广告词?<br>  ׃几秒钟,路h才明白,q是一道数学题。自然常数eQ?.718281828……Q的W一个十位数质数Q是目标|站的名字?<br>  好奇分子忍不住用Google搜烦L(fng)案来Q压根儿不晓得这是Google出的“骨?#8221;考题?<br>  不少人后来在规定旉内,d上了<a >www.7427466391.com</a>。然而,那不是梦寐以求的l点站,Google恶作剧似的,?#8220;高手”们在半山腰设了个休息的小凉亭?<br>  <a >www.7427466391.com</a>里,贴出一条更令h头疼的数学问题,{出q个问题Q能得到q入下一个网늚密码?<br>  跑完数学“马拉?#8221;Q?500?#8220;q存?#8221;走入Google实验室网,成功投出历。最后,Google只要?0个h?#8220;光以q告而论QGoogle也算得上高段Q?#8221; <br>  波士一家广告公司的高副总裁弗里?#183;库恩分析Q?#8220;目标人群看到q告后会(x)惻I‘q是我的语言Q那是冲着我来?#8217;Q对其他言Q广告也使Google的Ş象大大提升。他们可能会(x)惻I‘我是得不到这份工作的了。不q,在那儿工作的人真聪明’?#8221; <br>  Google试考的是脑筋 <br>  ·试着证明WWWDOT-GOOGLE=DOTCOM·用俳句(一U日本短诗,每句有一个与季节有关的词Q来描述各种模型Q借此预测|络搜烦量的季节性变化?<br>  ·你落入一个迷宫,回旋不断的走廊。手里有一台堆满灰的手提?sh)脑Q可以无U上|。周_(d)许多无生命的侏儒徘徊走动。这U情况下Q你?x)如何做Q?<br>  A)无目的地徘徊Q不停走入死胡同Q然后被q宫里面的妖怪吃掉?<br>  B)用手提电(sh)脑当铲子Q打I地板直接进入游戏下一兟?<br>  C)玩网l游戏《魔法奇c(din),直到甉|耗尽?<br>  D)利用计算机,扑ֈq宫的节点,发现准确\?<br>  E)把你的简历寄lGoogleQ告诉迷宫里领头的妖怪,你要退出游戏。然后,发现你回C现实世界?<br>  ·Unix有什么问题?你会(x)如何补救它? <br>  ·你在Google工作的第一天,发现你同寝室的室友,曑ֆq一本书。你研究生一qӞq本书是你最重要的参考资料。你?x)?x)A)求他帮你{个名。B)不改坐姿Q却放轻打字声音Q尽量避免媄响他?<br>  C)把你每天吃的麦片和咖啡,留给他吃?<br>  D)引用他那本书中间Q你最喜欢的程式,告诉他这则方E给了你多少启发?<br>  E)让他看看Q你可以用不?4句语句,完成一个高隑ֺE序?<br>  ·以下哪个最好地表达了Google的企业文化? <br>  A)“我感觉挺q运” <br>  B)“别干坏事” <br>  C)“哦,我已l完成了d” <br>  D)“你n?0c以内,必定能找到食?#8221; <br>  E)以上皆是·?Ƨ姆的电(sh)阻,l成无限大的放行炚wQ问“象棋跳马?#8221;Q?#8220;?#8221;字对角点Q两点之间的?sh)阻是多?<br>  ·下午2点,旧金p名的湑֌。你可以选择去阳光v岸、国家公园的U杉林里徒步旅行Q或者参观城?<br>里的文化景观。你?x)怎么做? <br>  ·搜烦技术的下一个革命性突破是什么? <br>  ·一个技术研I小l的最优化人员l合是几个hQ一旦超q这个数字,每增加一个研I员Q^均生产力׃(x)相应下降QA)1B)3C)5D)11E)24·三角形ABCQ用圆规和尺Q找出点PQ保证三角ŞABP、ACP和BCP周长相等?<br>  ·你写q最L(fng)E序是什么? <br>  ·扑և此数列的下一?10,9,60,90,70,66?A)96B)10?00ơ方C)A或者BD)以上皆否·用少?9个词Q描qC能带lGoogle实验室的贡献?<br> <br> <br>今年10月底QGoogle在美国《麻省技术评论》、《LinuxJournal》、《Mensa<br>》、《今日物理》等几本专业杂志上刊M一?#8220;Google实验室能力們֐试”?br>试卷Q开头蛊惑地写着“试试看!把答案寄回GoogleQ你有希望去Google总部参观<br>Qƈ成ؓ(f)我们其中一?#8221;。有兴趣的h可以做完了邮寄给Google公司Q也怼(x)得到<br>一个工作机?x)呢?br>  1、解{下面的隐藏{式Q其中的M和E的值可以互换,但不允许W一位是0Q?br>  WWWDOT - GOOGLE = DOTCOM<br>  2、用一个俳?一U日本短诗,每句有一个与季节有关的词)来徏立模型,?br>此预网l搜索流量的季节性变化;<br>  3?br>  1<br>  1 1<br>  2 1<br>  1 2 1 1<br>  1 1 1 2 2 1<br>  下一行是什么?<br>  4、你正处于一个全部由崎岖\构成的迷宫里Q手里有一个满是灰的W记<br>本,可以无线上网Q但是信号很弱。与此同Ӟ一些阴可怕、毫无生气的妖怪在<br>你nҎ(gu)荡。你?x)怎么做呢Q?br>  (1)毫无目的的四处游荡,到处壁Q直到被q宫里的妖怪吃掉?br>  (2)用笔记本作ؓ(f)挖掘工具Q打I地面直接进入下一兟?br>  (3)玩网l游戏《魔法骑c(din),直至甉|耗尽Q你也心灰意冗?br>  (4)使用W记本画宫的节点地图Q找到出路?br>  (5)发送简历给GoogleQ告诉主妖怪你选择退出,随后你就回到现实世界?br>  5、Unix有何~陷Q你准备如何补救Q?br>  6、在Google工作的第一天,你发现n边的同事竟然是研I生一q课本的作<br>者,你会(x)Q?br>  (1)dC好q烦取签名?br>  (2)不改变坐姿,但放L字声韻I避免影响她的工作和思考?br>  (3)把你每天的麦片和咖啡都留l她享用?br>  (4)在她所写的书中扑ֈ你最喜欢的内容,q告诉她q些内容已经成ؓ(f)你的?br>右铭?br>  7、下列哪句话最贴切的表达了Google的企业文化?<br>  (1)我感到很q运?br>  (2)不要q坏事?br>  (3)哦,我已l解决了那个问题?br>  (4)你n?0英寸之内Q必定能扑ֈ食物?br>  (5)以上皆是?br>  8、用3U颜色ؓ(f)20面体上色Q每个面一U颜Ԍ有多种l合Q你?x)选择哪些<br>颜色Q?br>  9、下面是故意留出的空白,请将其填满,使之看v来不那么I?br>  10、用1Ƨ姆的电(sh)ȝ成无限大的两l矩阵,“象棋跳马?#8221;(“?#8221;字对角点<br>)两点之间的电(sh)L多少Q?br>  11、现在是星期日下?点,你正在旧金山著名的湾区。你可以选择d家公<br>园的U杉林里徒步旅行Q或者参观城市里的文化景观。你?x)怎么做?<br>  12、你认ؓ(f)最的数学{式是什么?<br>  13、下列哪个团体没有在Google员工中Ş成?<br>  (1)奛_球<br>  (2)淡黄色爱好?br>  (3)Cricketeers<br>  (4)?dng)奖获得?br>  (5)葡萄酒俱乐部<br>  14、搜索技术的下一个革命性突破是什么?<br>  15、一个项目组由多h构成才能辑ֈ最优规模?也就是说Q一旦超q这一?br>字,每增加一个成员项目组的^均生产力׃(x)相应下降?br>  (1)1?br>  (2)3?br>  (3)5?br>  (4)11?br>  (5)24?br>  16、给你一个三角ŞABCQ请用圆规和找出点PQ保证三角ŞABP、ACP和BCP<br>周长相等?br>  17、有q样一个函敎ͼ对于L整数nQ都能返回写?到n之间出现“1”的个<br>数。例如,fQ?3Q?6。请注意fQ?Q?1Q那么下一个能实现fQnQ?n的最大数?br>是什么?<br>  18、你~写的最L(fng)黑客E序是什么?<br>  19、在下面的数列中Q下一个数字是多少Q?0, 9, 60, 90, 70, 66,?<br>  (1)96<br>  (2)10?00ơ方<br>  (3)以上皆是<br>  (4)以上皆不?br>  20、用于29个词Q描qC能带lGoogle实验室带来的贡献?天外)<br>--<br>“微Y是个公^的公司,q里几乎没有Ҏ(gu)。盖茨只是这两年才有了自q一个停车位?br>以前他来晚了没地儿,得自己到处L停R位?#8221;<br>“微Y非常员工的动手能力。在做新产品发布Ӟ盖茨都能自己动手做演C。他?br>是在和工E师作搭档,对自q产品很熟(zhn),q样QQ何h都糊弄不了他?#8221; <br> </p> <p>1.单项选择?br>1.  下面一D代码的输出是[  ]<br>void fn( int* b){<br>    (*b)++;<br>}<br>int main(){<br>    int a=7;<br>    fn(&a);<br>cout<<a;<br>return 0;<br>}<br>A.0     B.7    C.8    D.undefined<br>2.  定义int i,j,*p=&i; 那么下面哪条语句可以完成i=j的赋值[  ]<br>A.i=*p;     B. *p=*&j;    C.i=&j;    D.I=**p;<br>3.  用二叉搜索树(wi)和哈希表存储相同的数据集,对于以下何种操作,二叉搜烦?wi)比哈希?/p> <p>速度更快?[  ]<br>A.?nbsp;   B. 插入    C.删除    D.更新    E.排序<br>4.  包含N个几点和M条边的有向带权图G, 边的权ؓ(f)? 以下操作中不可以在O(N+M)<br>的时间复杂度内完成的操作?[  ]<br>A.  求结点s到结点t之间的最短距?br>B.  求距ȝ点s最q的l点<br>C.  已知起始l点, 对图G中的l点q行拓扑排序<br>D.  求图G的最大强q通子?br>5.  有如下递归函数f(n),其时间复杂度为[  ]<br>int f(int n){<br>    if(n==0)<br>     return 0;<br>    if(n==1)<br>     return 1;<br>    return ( 5*f(n-1) - 6*f(n-2));<br>}<br>A.O(n)     B. O(n^2)    C. O(n^3)    D. O(2^n)<br>6.  下面所q步骤中,哪一个不是创建经常所必需有的[  ]<br>A.p度程序ؓ(f)q程分配CPU       B.建立一个进E控制块<br>C.E分配内?nbsp;                   D.进E控制块铑օqA队列<br>7.  在多q程的系l中,Z保证公区变量的完整?各进E应互斥q入临界区。所谓(f)</p> <p>界区是[  ]<br>A.一个缓冲区        B.一个数据区        C.一个同步机?nbsp;     D.一D늨?br>8.  能生满_下条件语a的正则表辑ּ是:(x)1.每一个a后至紧跟两个c; 2.每一个b</p> <p>后至紧跟一个c [  ]<br>A.(acc|bc|c)*   B.(acc|bc)* C.(ac|bc)*  D.不是正则语言<br>9.  以下哪项不是RPCQ远E过E调用)的特点[  ]<br>A.速度?nbsp;       B.降低pȝ耦合?nbsp;       C.可以实现异构pȝ间的协作<br>10. 有三个桶Q容量分别是3升,5升,7升,你只能进行下面的操作Q?br>把一个桶中所有的水倒掉Q?br>把一个桶A中的水倒入桶BQ直到桶AIZ或者桶B满了Q?br>假设一开始容量ؓ(f)3升和5升的桶是满的Q?升的桶是I的Q希望通过一pd操作?个桶</p> <p>中Q意一个中正好?升水Q那么至需要[  ]ơ操作?br>A.3     B.5     C.7     D.不可?br>2.  E序设计与算?br>2.1 实现如下~码法Q对于重?-9ơ数的字W,用两个数字表C,即NXQ其中N为重</p> <p>复的ơ数QX为重复的字符Q下同)Q超q九(ji)个则先输?XQ然后处理剩下的字符。对?/p> <p>q箋的不重复的字W,则两边加1来封字符丌Ӏ如果被的字符串其中有数字?Q则?</p> <p>来{义?nbsp;   CZQ?AAAAAABCCCC -> 6A1B14C,  12344 -> 11123124。。。(下面的框</p> <p>架是用C++语言写的。你可以用你熟?zhn)的语a。)<br>void encode (const char* text, char* dest)<br>text 为需要编码的字符Ԍdest表示~码输出的目标空_(d)而空间够大<br>2.2l定一颗有n个结点的二叉?wi)。求它的所有结Ҏ(gu)为m的连通子图数目。m<=n分析你的</p> <p>法的时间复杂度Q解释算法即可,不必写代码?br> <br> <br>?     <br>  假设有这样一U字W串Q它们的长度不大?nbsp;  26   Q而且若一个这L(fng)字符串其长度?nbsp;  m   Q则q个字符串必定由   a,   b,   c   ...   z   中的?nbsp;  m   个字母构成,同时我们保证每个字母出现且仅出现一ơ。比方说某个字符串长度ؓ(f)   5   Q那么它一定是?nbsp;  a,   b,   c,   d,   e   q?nbsp;  5   个字母构成,不会(x)多一个也不会(x)一个。嗯嗯,q样一来,一旦长度确定,q个字符串中有哪些字母也q定了Q唯一的区别就是这些字母的前后序而已?nbsp;    <br>    <br>  现在我们用一个由大写字母   A   ?nbsp;  B   构成的序列来描述q类字符串里各个字母的前后顺序:(x)     <br>    <br>  如果字母   b   在字?nbsp;  a   的后面,那么序列的第一个字母就?nbsp;  A   QAfterQ,否则序列的第一个字母就?nbsp;  B   QBeforeQ;     <br>  如果字母   c   在字?nbsp;  b   的后面,那么序列的第二个字母是   A   Q否则就?nbsp;  BQ?nbsp;    <br>  如果字母   d   在字?nbsp;  c   的后面,那么   ……   不用多说了吧Q直到这个字W串的结束?nbsp;    <br>    <br>  q规则甚是简单,不过有个问题是同一?nbsp;  AB   序列Q可能有多个字符串都与之相符Q比方说序列“ABA”Q就?#8220;acdb”?#8220;cadb”{等好几U可能性。说的专业一点,q一个序列实际上对应了一个字W串集合。那么现在问题来了:(x)l你一个这L(fng)   AB   序列Q问你究竟有多少个不同的字符串能够与之相W?或者说q个序列对应的字W串集合有多大?注意Q只要求个数Q不要求枚D所有的字符丌Ӏ?nbsp;    <br>    <br>    <br>  嘿嘿Q这是你要解决的问题了。如果不嫌慢的话大可以穷举,不过q种解法拿出来那是显然不好意思和人打招呼的。事实上Q如果设   AB   序列的长度ؓ(f)   n   Q那么这个问题是可以做到   O(n^3)   的?nbsp; <br> </p> <p>1、有两根不均匀分布的香Q香烧完的时间是一个小Ӟ你能用什么方法来定一D?5分钟的时_(d)<br>{:(x)2栚w同时点燃Q第一根两头都点燃Q第二根只点一_(d) W一根点完的时候是半个时Q接着把第二根两头都点燃,W二根点完的时候就?5分钟?/p> <p>Q、一个经理有三个奛_Q三个女儿的q龄加v来等?3Q三个女儿的q龄乘v来等于经理自qq龄Q有一个下属已知道l理的年龄,但仍不能定l理三个奛_的年龄,q时l理说只有一个女儿的头发是黑的,然后q个下属q道了l理三个奛_的年龄。请问三个女儿的q龄分别是多?Z么?</p> <p>{:(x)2Q?Q?Q?1岁不可能</p> <p>3、有三个人去住旅馆,住三间房Q每一间房$10元,于是他们一׃l老板$30Q第二天Q老板觉得三间房只需?25元就够了于是叫小弟退?5l三位客人,谁知弟贪心,只退回每?1Q自己偷h?2Q这样一来便{于那三位客人每人各׃?ji)元Q于是三个h一p?27Q再加上弟独吞了不$2Qd?29。可是当初他们三个h一׃?30那么q有$1呢?<br>{:(x)没错Q三个h付了27块,老板拿了25块,弟拿了2?br>Q、有两位盲hQ他们都各自C两对黑袜和两对白袜,八对袜了的布质、大完全相同,而每对袜了都有一张商标纸q着。两位盲Z心?yu)八对袜了؜在一赗?他们每h怎样才能取回黑袜和白袜各两对呢?</p> <p>{:(x)不知道,q要仔细x<br>Q、有一辆火车以每小?5公里的速度dz杉矶直奔纽U,另一辆火车以每小?0公里的速度从纽U开往z杉矶。如果有一只鸟Q以30公里每小时的速度和两辆火车同时启动,从洛杉矶出发Q碰到另一辆R后返回,依次在两辆火车来回飞行,直到两辆火R盔RQ请问,q只鸟飞行了多长距?</p> <p>{:(x)记好两R盔R旉Q就是鸟飞行旉Q乘以其飞行速度得到飞行距R?/p> <p>Q、你有两个罐子,50个红色弹球,50个蓝色弹球,随机选出一个罐子,随机选取Z个弹球放入罐子,怎么l红色弹球最大的选中Z(x)Q在你的计划中,得到U球的准几率是多少Q?/p> <p>{:(x)不知道,q要仔细x</p> <p>Q、你有四个装药丸的罐子,每个药丸都有一定的重量Q被污染的药丸是没被污染的重量+1.只称量一ơ,如何判断哪个|子的药被污染了Q?br>{:(x)不知道,q要仔细x<br>Q、你有一桶果冻,其中有黄Ԍl色Q红色三U,闭上眼睛Q抓取两个同U颜色的果冻。抓取多个可以确定你肯定有两个同一颜色的果冻?<br>{:(x)4</p> <p>Q、对一批编号ؓ(f)1?00Q全部开x?开)的灯q行以下*作:(x)凡是1的倍数反方向拨一ơ开养I2的倍数反方向又拨一ơ开养I3的倍数反方向又拨一ơ开?#8230;…问:(x)最后ؓ(f)关熄状态的灯的~号?/p> <p>{:(x)不知道,q要仔细x</p> <p>Q0、想象你在镜子前Q请问,Z么镜子中的媄像可以颠倒左叻I却不能颠倒上下?</p> <p>{:(x)人的眼睛是左叛_U的<br>Q1、一h开舞会(x)Q每人头上都戴着一帽子。帽子只有黑白两U,黑的臛_有一。每个h都能看到其它人帽子的颜色Q却看不到自q。主持h先让大家看看别h头上戴的是什q帽子,然后关灯Q如果有己戴的是黑帽子,打自己一个耛_。第一ơ关灯,没有声音。于是再开灯,大家再看一遍,关灯时仍焉雀无声。一直到W三ơ关灯,才有劈劈啪啪打耛_的声韛_赗问有多h戴着黑帽子?<br>{:(x)3  <br> <br> </p> <p>一、单?br>1?0x86中,十进制数-3?6位二q制数表CZؓ(f)Q?br>2、假定符???分别代表减法、乘法和指数q算Q且<br>1)三个q算W优先序是:(x)-最高,*其次Q?最低;<br>2)q算W运时为左l合。请计算3-2*4$1*2$3的|(x)<br>(A)4096Q?B)-61Q?C)64Q?D)-80Q?E)512<br>3、下列伪代码中,参数是引用传递,l果是?<br>calc(double p, double q, double r){q=q-1.0;r=r+p}<br>main(){<br>  double a = 2.5, b = 9.0;<br>  calc(b-a, a, a);<br>  print(a);<br>}<br>(A)1.5 (B)2.5 (C)10.5 (D)8 (E)6.5<br>4、求输出l果Q?br>int foo(int x, int y){<br>  if(x <=0 || y <= 0) return 1;<br>  return 3 * foo(x - 1, y / 2);<br>}<br>printf("%d\n", foo(3, 5));<br>(A)81 (B)27 (C)9 (D)3 (E)1<br>5、下列哪个数据结构在优先队列中被最q泛使用Q?br>(A)?(B)数组 (C)双向链表 (D)?(E)向量<br>6、以下算法描qC一个在n国元素的双向链表中找到第k个元素的Ҏ(gu)Qk >= 1且k <= nQ:(x)<br>如果k <= n - kQ从链表开始往前进k-1个元素?br>否则Q从l点出发Q往回走n - k个元素?br>q个法的时间代hQ?br>(A)θ(nlogn) (B)θ(max{k, n - k}) (C)θ(k + (n - k))<br>(D)θ(max{k, k - n}) (E)θ(min{k, n - k})<br>7、有一个由10个顶点组成的图,每个点?个度Q那么这个图有几条边Q?br>(A)60 (B)30 (C)20 (D)80 (E)90<br>8、正则表辑ּL = x*(x|yx+)。下列哪个字W串不符合L<br>(A)x (B)xyxyx (C)xyx (D)yxx (E)yx<br>9、ؓ(f)d一块数据而准备磁盘驱动器的L间包?br>(A){待旉 (B)寻道旉 (C)传输旉 (D){待旉加寻道时?br>(E){待旉加寻道时间加传输旉<br>二、算?br>1、打印出一个二叉树(wi)的内宏V?br>2、在一个字W串中找到第一个只出现一ơ的字符。如abaccdeffQ输出b?br>3、给定一个长度ؓ(f)N的整数数l(元素有正有负Q,求所有元素之和,最大的一个子数组。分析算法时I复杂度。不必写代码?/p> <p>附上动态规划做法的{案:<br>最大子序列<br>问题Q?br>l定一整数序列A1Q?A2Q?.. An Q可能有负数Q,求A1~An的一个子序列Ai~AjQ得Ai到Aj的和最?br>例如Q整数序?2, 11, -4, 13, -5, 2, -5, -3, 12, -9的最大子序列的和?1。对于这个问题,最单也是最Ҏ(gu)惛_的那是ID所有子序列的方法。利用三重@环,依次求出所有子序列的和然后取最大的那个。当然算法复杂度?x)达到O (n^3)。显然这U方法不是最优的Q下面给Z个算法复杂度为O(n)的线性算法实玎ͼ法的来源于Programming Pearls一书。在l出U性算法之前,先来看一个对ID法q行优化的算法,它的法复杂度ؓ(f)O(n^2)。其实这个算法只是对对穷丄法稍微做了一些修改:(x)其实子序列的和我们ƈ不需要每ơ都重新计算一遍。假设Sum(i, j)是A ... A[j]的和Q那么Sum(i, j+1) = Sum(i, j) + A[j+1]。利用这一个递推Q我们就可以得到下面q个法Q?br>int max_sub(int a[],int size)<br>{<br>  int i,j,v,max=a[0];<br>  for(i=0;i<size;i++)<br>  {<br>    v=0;<br>    for(j=i;j<size;j++)<br>    {<br>      v=v+a[j];//Sum(i, j+1) = Sum(i, j) + A[j+1]<br>        if(v>max)<br>         max=v;<br>    }<br>  }<br>  return max;<br>}<br>那怎样才能辑ֈU性复杂度呢?q里q用动态规划的思想。先看一下源代码实现Q?br>int max_sub2(int a[], int size)<br>{<br>  int i,max=0,temp_sum=0;<br>  for(i=0;i<size;i++)<br>  {<br>      temp_sum+=a;<br>      if(temp_sum>max)<br>        max=temp_sum;<br>      else if(temp_sum<0)<br>        temp_sum=0;<br>  }<br>  return max;<br>}<br>在这一遍扫描数l当中,从左到右记录当前子序列的和temp_sumQ若q个和不断增加,那么最大子序列的和max也不断增?不断更新 max)。如果往前扫描中遇到负数Q那么当前子序列的和会(x)减小。此时temp_sum 会(x)于maxQ当然max也就不更新。如果temp_sum降到0Ӟ说明前面已经扫描的那一D就可以抛弃了,q时temp_sum|ؓ(f)0。然后, temp_sum从后面开始将q个子段q行分析Q若有比当前max大的子段Ql更新max。这样一扫描结果也出来了?nbsp; <br> <br> </p> <p>GoogleW试是没有门槛的。这栯是因为GoogleҎ(gu)没有限制W试的h敎ͼ开了N个教室,让N多h参加……不过W试本n却有门槛Q看了题目就知道?br>  本来想上午写写的Q但是,嗯,Z攒h品的目的Q还是等到现在才写——现在,面试通知已经发过Q很昄我又被无视了……OKQ那也不错,我也没怎么准备q些东西呢,倒不是说我不重视Q而是事情太多……唔,多少是一U经验了?br>  回来说说昨天的笔试。题目的量ƈ不大Q除了几个单选题Q剩下就是三个编E或法题。单选就不说了,考得比较基础Q涉?qing)C语言常识、数据结构、文法、操作系l,主要说说大题?br>  大题虽然题型不一Q但都有一个重要特点:(x)考递归。精点_(d)我每一题都用到了递归?br>  W一个的题目Q嗯Q记的不是很完整Q:(x)<br>在一(排序Q)二叉?wi)中搜烦指定|数据l构定义为(唉唉Q数据结构的具体名字都不记得了,my godQ:(x)<br>struct Node<br>{<br>    Node * lnext;<br>    Node * rnext;<br>    int value;<br>};<br>函数定义为(情况同上Q啥都记不清了)Q?br>Node * search(Node * root, int value)<br>{<br>}<br>实现q个search函数?br>用递归Q经典的?wi)的遍历Qpass先?br>W二个的题目Q?br>计算Tribonaci队列Q嗯Q九(ji)成九(ji)记错了那个单?#8230;…Q,规则是T(n) = T(n - 1) + T(n - 2) + T(n -3)Q其中T(0) = T(1) = 1QT(2) = 2?br>函数定义Q?br>int Tribonaci(int n) {<br>}<br>备注Q不考虑证整数溢出,可能优化算法?br>  q一题我一看就知道要考什么,很显然的递归定义Q但也是很显然的Q这里所谓的优化是指不要重复计算?br>  单的_(d)在计T(n)的时候要用到T(n - 1)、T(n - 2)和T(n - 3)的结果,在计T(n - 1)的时候也要用到T(n - 2)和T(n - 3)的结果,所以在各项计算的时候必L以前计算的结果记录下来,L重复计算。这里用到的一点小技巧就是要新写一个函数用来做q种事情Q嗯Q看看我写的代码吧!<br>    /**<br>      Get the value of T(n - 1), and retrieve the result of<br>      T(n - 2) and T(n - 3).<br>      @param[in] n The n in T(n).<br>      @param[out] mid Value of T(n - 2).<br>      @param[out] right Value of T(n - 3).<br>      @return Value of T(n - 1).<br>     */<br>    int find_trib(int n, int & mid, int & right)<br>    {<br>        if (3 == n)<br>        {<br>            mid = 1;<br>            right = 1;<br>            return 2;<br>        }<br>        else<br>        {<br>            int temp;<br>            mid = find_trib(n - 1, right, temp);<br>            return mid + right + temp;<br>        }<br>    }<br>    /**<br>      Find value of T(n).<br>      @param[in] The n in T(n).<br>      @return Value of T(n).<br>      @note T(n) = T(n - 1) + T(n - 2) + T(n - 3) (n > 2)<br>            T(0) = T(1) = 1, T(2) = 2.<br>     */<br>    int tribonaci(int n)<br>    {<br>        if (n < 0)<br>        {<br>            // Undefined feature.<br>            return 0;<br>        }<br>        if (0 == n || 1 == n)<br>        {<br>            return 1;<br>        }<br>        if (2 == n)<br>        {<br>            return 2;<br>        }<br>        int mid, right;<br>        int left = find_trib(n, mid, right);<br>        return left + mid + right;<br>    }<br>  啊啊Q对了,{卷的时候我可没心情写注?#8230;…刚才到VC.Net 2003上测试了一下,貌似没有啥问题。唉Q看来我多少q是懂一点算法的……<br>  W三个的题目Q?br>  在一个无向图中,L是否有一条距Mؓ(f)K的\径,描述法卛_Q不用实玎ͼ分析法的时间和I间复杂度,量优化法?br>  OKQ这个就是传说中的Y肋了………………我也׃把自q{案写出来了Q丢人啊Q,虽然后来仔细xQ我那个挫挫的方法也能够?#8230;…只是效率……<br>  That's all. <br>转蝲h明出自应届生求职招聘论坛 <a >http://bbs.yingjiesheng.com/</a>,本脓(chung)地址:http://bbs.yingjiesheng.com/thread-21638-1-1.html</p> <p> </p> <p> </p> <img src ="http://www.shnenglu.com/Walker/aggbug/136335.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Walker/" target="_blank">漫步者?…?K?/a> 2010-12-13 22:01 <a href="http://www.shnenglu.com/Walker/articles/136335.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.qlswxflaw.cn" target="_blank">þwww˳_Ƭ</a>| <a href="http://www.ekqt.cn" target="_blank">޾ƷۺϾþһ</a>| <a href="http://www.buksk.cn" target="_blank">þþƷŷƬ</a>| <a href="http://www.qxmsv.cn" target="_blank">ƷëٸAVѾþ</a>| <a href="http://www.tril.cn" target="_blank">99þù¶Ʒ</a>| <a href="http://www.52maila.cn" target="_blank">޾Ʒþþþþ</a>| <a href="http://www.ekgb.cn" target="_blank">þAVĻ</a>| <a href="http://www.threecar.com.cn" target="_blank">ŷһþþƷ</a>| <a href="http://www.66zhuangzxkcw.cn" target="_blank">ξþ99Ʒþþþþ</a>| <a href="http://www.dui46.cn" target="_blank">þþƷһ</a>| <a href="http://www.girla.cn" target="_blank">Ʒ99þþþ91gav</a>| <a href="http://www.aaa69.cn" target="_blank">ŷƷһƷþ</a>| <a href="http://www.bao5888.cn" target="_blank">Ʒ91þþþþþ</a>| <a href="http://www.qunfaruanjian.org.cn" target="_blank">ҹѸþӰԺ</a>| <a href="http://www.20xjj.cn" target="_blank">ݺݺɫۺϾþ </a>| <a href="http://www.shbolangjixie.cn" target="_blank">ŮһaëƬþw</a>| <a href="http://www.vphz.cn" target="_blank">TOKYOۺϾþþƷ</a>| <a href="http://www.qqzhuti.cn" target="_blank">˸ŮѲžþþ</a>| <a href="http://www.hearingaids.net.cn" target="_blank">ɫav˾þô߽ӰԺ </a>| <a href="http://www.46test.cn" target="_blank">޾ƷŮþþþ99</a>| <a href="http://www.youarecharming.cn" target="_blank">һɫۺϾþ</a>| <a href="http://www.homeshining.com.cn" target="_blank">޾Ʒþþþþò</a>| <a href="http://www.jxscool.cn" target="_blank">þƵ</a>| <a href="http://www.domaincup.cn" target="_blank">þþûɫƬ</a>| <a href="http://www.aizhei.cn" target="_blank">þþƷAV͵</a>| <a href="http://www.taoxh.cn" target="_blank">Ʒþþþ9999</a>| <a href="http://www.2046film.cn" target="_blank">99ȳ˾ƷѾþ</a>| <a href="http://www.niugu6.cn" target="_blank">˼˼þ99ѾƷ6</a>| <a href="http://www.dcjx02.cn" target="_blank">þþҹƷ</a>| <a href="http://www.foshai.cn" target="_blank">þþһƷ99þþƷ88</a>| <a href="http://www.qunfazongzhan.cn" target="_blank">˹ھƷþþþһ</a>| <a href="http://www.hasgw.cn" target="_blank">þavСݲ</a>| <a href="http://www.yizhu888.cn" target="_blank">þùŷպƷ</a>| <a href="http://www.vlln.cn" target="_blank">þݺҹҹ2O2O</a>| <a href="http://www.zjhgkjjt.com.cn" target="_blank">TOKYOۺϾþþƷ</a>| <a href="http://www.flcqki.cn" target="_blank">þþþúǿ׊</a>| <a href="http://www.kzwn.net.cn" target="_blank">޹˾þһWWW</a>| <a href="http://www.571jia.cn" target="_blank">պƷþþþþ</a>| <a href="http://www.qimenglw.cn" target="_blank">һһþþƷۺ</a>| <a href="http://www.1122sw.cn" target="_blank">þþù׮</a>| <a href="http://www.qlong.net.cn" target="_blank">պƷþþþþ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>