- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 Leetcode_20. Valid Parentheses
题目: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type...
2018-06-10 22:01:32 105
原创 Leetcode_17. Letter Combinations of a Phone Number
题目: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) i...
2018-06-10 21:15:07 133
原创 Leetcode_16. 3Sum Closest
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would ...
2018-06-10 16:28:42 124
原创 Leetcode_14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: [“flower”,”flow”,”flight”] Output:...
2018-06-10 15:24:00 104
原创 Leetcode_15 3Sum
题目:Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not...
2018-06-10 15:07:31 92
转载 Traits 编程技法+模板偏特化+template参数推导+内嵌型别编程技巧
本文版权归作者 kanego 和博客园共有,原文地址:https://www.cnblogs.com/kanego/archive/2012/08/15/2639761.htmlSTL中,traits编程技法得到了很大的应用,了解这个,才能一窥STL奥妙所在。先将自己所理解的记录如下:Traits技术可以用来获得一个 类型 的相关信息的。 首先假如有以下一个泛型的迭代器类,其中类型参数...
2018-06-09 19:38:09 263
原创 条款05:了解C++默认编写并调用哪些函数
如果自己没申明,编译器会为它声明(编译器版本的)一个copy构造函数、一个copy构造函数、一个copy assignment操作符和一个析构函数。此外如果你没有申明任何构造函数,编译器也会为你声明一个default构造函数。所有这些函数都是Public且inline因此,如果你写下: Empty& operator=(const Empty& rhs){…} //默...
2018-06-07 23:29:42 142
原创 Ubuntu16.04 关机卡死的解决方案
最近我的系统经常在关机的时候死机,就是卡住动不了,试了几种方案。 1:可以更新下内核。 内核地址:http://kernel.ubuntu.com/~kernel-ppa/mainline/然后下载下来,使用命令sudo dpkg -i *.deb然后使用 uname -a 查看内核版本然后重启试下如果还是不行,那么可以在关机之前,使用下面命令sync &amp...
2018-06-05 11:40:43 23832 6
原创 连接文件: ln
参考自 <<鸟哥的私房菜 基础学习篇>> 加入点自己的理解。 在LInux下面的连接文件有两种,一种是类似WIndows的快捷方式功能的文件,可以让你快速连接到目标文件(或目录);另一种则是通过文件系统的inode连接来产生新文件名,而不是产生新文件,这种称为硬连接(hard link)。hard link(硬连接或实际连接) 首先介绍几个信息: 1:每个文件都会...
2018-06-01 13:45:31 555
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人