2014年3月11日

Reverse Words in a String

摘要: 1 void reverseWords(string &s) { 2 string res = "", tmp = ""; 3 int l = s.length(); 4 int i = 0; 5 while(i < l){ 6 if(s[i] != ' ') 7 tmp += s[i++]; 8 else{ 9 if(tmp != ""){10 if(res == ""... 阅读全文

posted @ 2014-03-11 20:48 waruzhi 阅读(129) 评论(0) 推荐(0) 编辑

Median of Two Sorted Arrays

摘要: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文

posted @ 2014-03-11 20:17 waruzhi 阅读(258) 评论(0) 推荐(0) 编辑

LeetCode Question Difficulty Distribution

摘要: 参考链接:https://docs.google.com/spreadsheet/pub?key=0Aqt--%20wSNYfuxdGxQWVFsOGdVVWxQRlNUVXZTdEpOeEE&output=htmlIDQuestionDiffFreqData StructureAlgorithms1Two Sum25arraysortsetTwo Pointers2Add Two Numbers34linked listTwo PointersMath3Longest Substring Without Repeating Characters32stringTwo Pointers 阅读全文

posted @ 2014-03-11 11:04 waruzhi 阅读(298) 评论(0) 推荐(0) 编辑

导航