摘要: 1 class Solution { 2 public: 3 int romanToInt(string s) { 4 char temp; 5 int leng=s.length(); 6 if(leng==0) 7 ... 阅读全文
posted @ 2015-07-04 11:39 阿怪123 阅读(137) 评论(0) 推荐(0)
摘要: 基本思想:首先统计两个链表的长度,并且在循环的过程中,看是否最终是会聚到同一个位节点,若是,则表示两个表有交汇,若否,这返回NULL之后,对长表进行修剪,剪去多余的表头部分,之后两表并列循环向后查找,找到相同项即是交汇节点。 1 /** 2 * Definition for singly-link... 阅读全文
posted @ 2015-07-04 10:43 阿怪123 阅读(133) 评论(0) 推荐(0)