摘要:
Find the common length part, then check with two pointers. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *... 阅读全文
摘要:
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 ... 阅读全文
摘要:
Pretty straight forward. 1 class Solution { 2 public: 3 string getRoman(int n, char ten, char five, char one) { 4 string result; 5 ... 阅读全文
摘要:
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 * ... 阅读全文
摘要:
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 ... 阅读全文