Longest Common Prefix

摘要: class Solution {public: string longestCommonPrefix(vector &strs) { // Start typing your C/C++ solution below // DO NOT write int main() function int size = strs.size(); if(size == 0) return ""; if(size == 1) return strs[0]; int i = 0; string result = ""; while(1) { if(strs[0] 阅读全文
posted @ 2013-09-06 20:27 邪灵天使 阅读(111) 评论(0) 推荐(0)

Roman to Integer

摘要: class Solution {public: int romanToInt(string s) { // Start typing your C/C++ solution below // DO NOT write int main() function map m; m['I'] = 1; m['V'] = 5; m['X'] = 10; m['L'] = 50; m['D'] = 500; m['C'] = 100; m['M'] = 1000; int pre = 2000; 阅读全文
posted @ 2013-09-06 20:00 邪灵天使 阅读(77) 评论(0) 推荐(0)

Intger to Roman

摘要: class Solution {public: string intToRoman(int num) { // Start typing your C/C++ solution below // DO NOT write int main() function if(num3999) return ""; string temp = ""; int n = num/1000; while(n--) { temp += 'M'; } ... 阅读全文
posted @ 2013-09-06 17:36 邪灵天使 阅读(144) 评论(0) 推荐(0)

Container With Most Water

摘要: class Solution {public: int maxArea(vector &height) { // Start typing your C/C++ solution below // DO NOT write int main() function int width = height.size(); int max = 0; int left = 0,right = width-1; while(leftmax) max = width; if(... 阅读全文
posted @ 2013-09-06 15:25 邪灵天使 阅读(76) 评论(0) 推荐(0)

Regular Expression Matching

摘要: class Solution {public: bool isMatch(const char *s, const char *p) { // Start typing your C/C++ solution below // DO NOT write int main() function if(*p == '\0') return *s == '\0'; if(*(p+1)!='*') { if(*p==*s||(*p=='.'&&*s!='\0')) ... 阅读全文
posted @ 2013-09-06 15:09 邪灵天使 阅读(73) 评论(0) 推荐(0)

atoi

摘要: class Solution {public: int atoi(const char *str) { // Start typing your C/C++ solution below // DO NOT write int main() function if(str==NULL) return 0; while(*str==' ') { str++; } if((*str)!='+'&&(*str)!='-') { ... 阅读全文
posted @ 2013-09-05 10:53 邪灵天使 阅读(142) 评论(0) 推荐(0)

Rotate List

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public:ListNode *rotateRight(ListNode *head, int k) {// Start typing your C/C++ solution below// DO NOT write int main() functionif(h... 阅读全文
posted @ 2013-09-04 23:53 邪灵天使 阅读(90) 评论(0) 推荐(0)

Longest Palindromic Substring

摘要: #include #include using namespace std; class Solution {public:string longestPalindrome(string s) {// Start typing your C/C++ solution below// DO NOT write int main() functionif(s == "")return "";int max = -1;string result;int length = s.length();int g1,g2;for(int i = 0;i g1) { if 阅读全文
posted @ 2013-09-04 19:54 邪灵天使 阅读(139) 评论(0) 推荐(0)

关于学术搜索

摘要: 邹欣老师:1,这个学术搜索做的很炫,但是有些地方我还是不太理解,进入http://academic.research.microsoft.com/主页后,不添加任何搜索条件点击搜索之后主界面发生了变化,但是再看看网页的URL地址还是没有变,http://academic.research.microsoft.com/,这时候再点击学术搜索的logo它有时候就会跳回到刚才图标的状态,但是不是固定的是有时候这个页面没有变化,这是怎么做到的呢?这算不算是个bug?2,这个学术搜索网站有没有打算在将来,提供多种语言支持?3,学术搜索网站的加载各种图片的功能很炫,显示图片的一些控件是用统一的开发工具做的 阅读全文
posted @ 2012-04-11 08:54 邪灵天使 阅读(303) 评论(1) 推荐(0)

关于微软学术搜索项目

摘要: 微软学术搜索项目的开发过程,用到了迭代开发的模式,每个迭代周期的测试验收阶段都有一个里程碑发布,经过一系列的迭代开发,最终形成了现在的V3M3版本。迭代开发的每个周期里都分为初期,设计,开发,交付等步骤,不断完善系统的功能。bug:1.在CFPCalendar页面中,Timelineview下的时间选择条,当时间间隔较小时,不能得到准确日期的全部显示。2.在CFPCalendar页面中,右下方的表格的第二例的那个锁定状态图标,点击后,锁定的项目栏跳到表格前端,但是此时表格也滑动到最顶端,很不方便。 阅读全文
posted @ 2012-04-05 21:42 邪灵天使 阅读(397) 评论(1) 推荐(0)