上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: 在C++中,众所周知在一个资源管理类(例如含有指向堆内存的指针)中需要重新定义拷贝构造函数、赋值运算符以及析构函数(Big Three),在新标准下还可能需要定义移动构造函数和移动赋值运算符(Big Five)。但实际上,这条规则还可以有一个小扩展。就是在资源管理类中,往往需要重新定义自己的swap 阅读全文
posted @ 2016-10-24 22:32 wangxiaobao1114 阅读(556) 评论(0) 推荐(2) 编辑
摘要: 题目: A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determi 阅读全文
posted @ 2016-10-24 21:34 wangxiaobao1114 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing only digits, restore it by returning all possible valid IP address combinations. (Medium) For example:Given "25525511135 阅读全文
posted @ 2016-10-24 21:01 wangxiaobao1114 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse a linked list from position m to n. Do it in-place and in one-pass. (Medium) For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, retur 阅读全文
posted @ 2016-10-24 20:56 wangxiaobao1114 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate 阅读全文
posted @ 2016-10-21 22:05 wangxiaobao1114 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 题目: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total 阅读全文
posted @ 2016-10-21 22:02 wangxiaobao1114 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 最长公共子序列是经典的动态规划问题,在很多书籍和文章中都有介绍,这里对这一经典算法进行回顾并对两个follow up questions进行总结和分析。 1. 回顾LCS(longest common subsequence)解法,求LCS长度 典型的双序列动态规划问题,dp[i][j]表示第一个序 阅读全文
posted @ 2016-10-20 22:27 wangxiaobao1114 阅读(463) 评论(0) 推荐(0) 编辑
摘要: C++11/14关键字constexpr用法及注意事项,包括constexpr变量,constexpr修饰函数,构造函数等 阅读全文
posted @ 2016-10-16 12:40 wangxiaobao1114 阅读(6900) 评论(2) 推荐(1) 编辑
摘要: 阻塞、非阻塞、I/O复用、同步I/O、异步I/O 阅读全文
posted @ 2016-10-14 11:18 wangxiaobao1114 阅读(1272) 评论(1) 推荐(4) 编辑
摘要: 题目: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve 阅读全文
posted @ 2016-10-13 22:25 wangxiaobao1114 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页