welcome to Qijie's Blog 薛其杰
02 2010 档案
雷:面试时被问到fibonacci
摘要:1 1 2 3 5 8...递归:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticintFibonacciRecursive(intn){if(n==1||n==2)return1;elseif(n>=2){returnFibon... 阅读全文
posted @ 2010-02-20 11:11 零点零一 阅读(344) 评论(1) 推荐(0)
打印输入字符串的字母所有顺序的排列
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticvoidPrintSequenceString(stringinputStr){if(string.IsNullOrEmpty(inputStr))thrownewArgumentNull... 阅读全文
posted @ 2010-02-09 12:46 零点零一 阅读(375) 评论(0) 推荐(0)
查找第一次出现的子串位置
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticintReturnIndex(stringinputStr,stringsubStr){if(string.IsNullOrEmpty(inputStr))thrownewArgument... 阅读全文
posted @ 2010-02-08 20:28 零点零一 阅读(427) 评论(0) 推荐(0)
统计字符出现的次数
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticvoidReturnShowCOunt(stringinputStr){if(string.IsNullOrEmpty(inputStr))thrownewArgumentNullExce... 阅读全文
posted @ 2010-02-08 17:36 零点零一 阅读(325) 评论(0) 推荐(0)
考虑无符号整数的二进制中1的个数
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticintCountOneInInteger(intvalue){intiter=1;intcount=0;for(inti=0;i<32;i++){if((value&iter... 阅读全文
posted @ 2010-02-08 14:13 零点零一 阅读(252) 评论(0) 推荐(0)
整数转字符串
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticstringTransToString(intvalue){intstep=1000000000;char[]results=newchar[10];intindex=0;if(value... 阅读全文
posted @ 2010-02-08 13:50 零点零一 阅读(289) 评论(0) 推荐(0)