2014年3月13日

摘要: Problem:Sort a linked list using insertion sort.The node of the linked list is defined as:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */The insertion sorting is one of the simpleset sorting algor... 阅读全文

posted @ 2014-03-13 03:05 卢泽尔 阅读(264) 评论(0) 推荐(0)

摘要: Problem link:http://oj.leetcode.com/problems/reverse-words-in-a-string/Given an input string, reverse the string word by word. For example,Given s = "... 阅读全文

posted @ 2014-03-13 02:52 卢泽尔 阅读(286) 评论(2) 推荐(0)