03 2015 档案

摘要:题目描述:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.You... 阅读全文
posted @ 2015-03-24 20:54 Sawyer Ford 阅读(204) 评论(0) 推荐(0)
摘要:题目描述:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity. 因为之前做过Merge Two Sorted Lists,所以这道题也就显得不那么难了。sol... 阅读全文
posted @ 2015-03-23 19:18 Sawyer Ford 阅读(157) 评论(0) 推荐(0)
摘要:题目描述:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 直接... 阅读全文
posted @ 2015-03-23 15:14 Sawyer Ford 阅读(153) 评论(0) 推荐(0)
摘要:题目描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set i... 阅读全文
posted @ 2015-03-20 21:56 Sawyer Ford 阅读(181) 评论(0) 推荐(0)
摘要:题目描述:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in ... 阅读全文
posted @ 2015-03-11 15:18 Sawyer Ford 阅读(206) 评论(0) 推荐(0)
摘要:题目描述:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. A... 阅读全文
posted @ 2015-03-11 08:25 Sawyer Ford 阅读(181) 评论(0) 推荐(0)
摘要:题目描述:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the tel... 阅读全文
posted @ 2015-03-05 15:09 Sawyer Ford 阅读(152) 评论(0) 推荐(0)
摘要:本文结论: const对象、指向const对象的指针或引用只能用于调用其const成员函数。实例说明:class A{public: void mf1(){ cout<<"Function Call"<<endl; } void mf2() const{ cout<<"const F... 阅读全文
posted @ 2015-03-04 22:27 Sawyer Ford 阅读(143) 评论(0) 推荐(0)