摘要:
Find the common length part, then check with two pointers. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *... 阅读全文
posted @ 2015-03-20 05:47
keepshuatishuati
阅读(138)
评论(0)
推荐(0)
摘要:
Notes:1. Even s3 is empty string, if s1 and s2 are emtpy, then it should be true.2. Do not mess up the size of label. 1 class Solution { 2 public: 3 ... 阅读全文
posted @ 2015-03-20 04:56
keepshuatishuati
阅读(118)
评论(0)
推荐(0)
摘要:
Pretty straight forward. 1 class Solution { 2 public: 3 string getRoman(int n, char ten, char five, char one) { 4 string result; 5 ... 阅读全文
posted @ 2015-03-20 04:11
keepshuatishuati
阅读(127)
评论(0)
推荐(0)
摘要:
Do not forget to break the inner loop, when you find the insert position. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * ... 阅读全文
posted @ 2015-03-20 04:07
keepshuatishuati
阅读(132)
评论(0)
推荐(0)
摘要:
Similar to merge intervals. But this is easier than merge interval, because every side is kind of "sorted". 1 /** 2 * Definition for an interval. 3 ... 阅读全文
posted @ 2015-03-20 03:07
keepshuatishuati
阅读(145)
评论(0)
推荐(0)
浙公网安备 33010602011771号