摘要: /*struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { }};*/class Solution {public: ListNode* deleteDuplication(Li 阅读全文
posted @ 2017-02-26 23:14 夜雨寒山 阅读(88) 评论(0) 推荐(0) 编辑
摘要: /*struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { }};*/class Solution {public: ListNode* FindKthToTail(ListNo 阅读全文
posted @ 2017-02-26 22:31 夜雨寒山 阅读(109) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: ListNode* ReverseList(ListNode* pHead) { //变量定义区 ListNode* pCurrent = pHead; ListNode* pPrevious = NULL; ListNode* rHead = NUL 阅读全文
posted @ 2017-02-26 22:19 夜雨寒山 阅读(88) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: void replaceSpace(char *str,int length) { //变量定义区 int newtv = 0; int oldtv = 0; int spaceNum = 0; //入参有效性判断 if( NULL == str || 阅读全文
posted @ 2017-02-26 22:04 夜雨寒山 阅读(194) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: vector<int> printListFromTailToHead(ListNode* head) { /* //变量定义区 vector<int> result; std::stack<int> stk; ListNode* current = 阅读全文
posted @ 2017-02-26 21:41 夜雨寒山 阅读(518) 评论(0) 推荐(0) 编辑