日复一日

厚积薄发|跳跃的人生

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

摘要: 应朋友们的要求,现在把目录整理如下。希望能方便大家阅读。今后系列文章不再发布。(如果中间图片信息不能显示,请刷新)微软面试技术题(1)微软面试技术题(2)微软面试技术题(3)微软面试技术题(4)微软面试技术题(5)微软面试技术题(6)微软面试技术题(7)微软面试技术题(8)微软面试技术题(9)微软面试技术题(10)微软面试技术题(11)微软面试技术题(12)微软面试技术题(13)微软面试技术题(1... 阅读全文
posted @ 2006-06-20 10:50 GwQ 阅读(6798) 评论(4) 推荐(0) 编辑

2006年6月26日

摘要: You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you ... 阅读全文
posted @ 2006-06-26 23:59 GwQ 阅读(5534) 评论(5) 推荐(0) 编辑

2006年6月21日

摘要: 3. You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighings how do you find the defective one? 经典的八球称重,不高兴做了,谁来? 阅读全文
posted @ 2006-06-21 18:09 GwQ 阅读(2320) 评论(2) 推荐(0) 编辑

摘要: 2. There are 3 baskets. one of them have apples, one has oranges only and the other has mixture of apples and oranges. The labels on their baskets always lie. (i.e. if the label says oranges, you are ... 阅读全文
posted @ 2006-06-21 17:39 GwQ 阅读(1855) 评论(2) 推荐(0) 编辑

摘要: * 1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straigh... 阅读全文
posted @ 2006-06-21 17:35 GwQ 阅读(2149) 评论(0) 推荐(0) 编辑

摘要: 0. Classic: If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks one mile north and arrives at its original position, what is the color of the ... 阅读全文
posted @ 2006-06-21 17:13 GwQ 阅读(4736) 评论(4) 推荐(0) 编辑

2006年6月20日

摘要: 输入一个字符串,输出长型整数。1longatol(char*str){2char*p=str;3longl=1;m=0;4if(*p=='-'){5l=-1;6++p;7}8while(isDigit(*p)){9m=m*10+p;10++p;11}12if(!p)returnm*l;13elsereturnerror;14} 阅读全文
posted @ 2006-06-20 00:58 GwQ 阅读(1410) 评论(5) 推荐(0) 编辑

2006年6月18日

摘要: 输出一个字符串所有排列。注意有重复字符。1char[]p;2voidperm(chars[],inti,intn){3intj;4chartemp;5for(j=0;j<n;++j){6if(j!=0&&s[j]==s[j-1]);7elseif(s[j]!='@'){8p[i]=s[j];9s[j]='@';10if(i==n-1){11p[n]='\0';12printf... 阅读全文
posted @ 2006-06-18 21:17 GwQ 阅读(2056) 评论(16) 推荐(0) 编辑

2006年6月17日

摘要: 面试过程中我还遇到了下面几题:1、如何删除链表的倒数第m的元素?我的方法是先用pre指针从链表头开始步进m,新建pst节点next指针指向头节点,cur指针指向头节点,然后pre,cur,post三个指针一起步进,当pre指向链表结尾的时候cur指向倒数第m个元素,最后利用pst指针删除cur指向元素。2、如何判断一个字符串是对称的?如a,aa,aba。设置头尾指针同时向中间比较靠齐直至相遇。3、... 阅读全文
posted @ 2006-06-17 08:54 GwQ 阅读(1588) 评论(1) 推荐(0) 编辑

摘要: 不重复地输出升序数组中的元素。1 void outputUnique( char []str, int n) {2 if (n <= 0 ) return ;3 elseif(n == 1 )putchar(str[ 0 ]);4 else {5 int i = 0 ,j = 1 ;6 putchar(str[ 0 ]);7 while (j < n) {8 if (str[j... 阅读全文
posted @ 2006-06-17 08:54 GwQ 阅读(1135) 评论(0) 推荐(1) 编辑