摘要: Reverse a singly linked list对于这种可以修改值的,把值逆序就可以了。。。。用vector存,然后逆序读。都忘了指针怎么赋值初始化了。*p=&head; 1 /** 2 * Definition for singly-linked list. 3 * struct Li... 阅读全文
posted @ 2015-11-17 19:03 0giant 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.题目虽短,但是难度还是在那里的。首先,我们需要明白罗马数字是怎么计数的,当你明白了这个就... 阅读全文
posted @ 2015-11-17 17:03 0giant 阅读(209) 评论(0) 推荐(0) 编辑