码迷,mamicode.com
首页 > 其他好文
LeetCode – Refresh – Letter Combination of a Phone Number
This is just a combination. Use hashtable to hold the number ==> charsnotes:1. check corner case : input is empty, do not return vector contains empty...
分类:其他好文   时间:2015-03-20 08:03:21    阅读次数:127
常用设计模式的类图
分类:其他好文   时间:2015-03-20 08:04:00    阅读次数:222
位运算和关于两个数交换的多种方法
用位运算来交换两个数的值,值得学习...
分类:其他好文   时间:2015-03-20 07:00:19    阅读次数:119
LeetCode – Refresh – Largest Number
Corner case: when all the elements are 0. It should return "0", not "00000000".It use string to compare all the numbers. 1 class Solution { 2 public: ...
分类:其他好文   时间:2015-03-20 06:58:14    阅读次数:109
养生四字经
衣衣不过厚,不怕温高,衣不过薄,不怕风高。食吃米带糠,吃菜带帮,男不离韭,女不离藕,青红萝卜,生克熟补,食不过饱,饱不急卧。住春不露脐,夏不睡石,秋不睡板,冬不蒙头。按时入睡,定时起床,起身要慢,勿急勿慌。行站如松直,坐如钟稳,动如风意,睡如弓形。传统的养生之道:养身在动,养心在静。饮食有节,起居有...
分类:其他好文   时间:2015-03-20 06:59:16    阅读次数:124
LeetCode – Refresh – Jump Game II
Same with Jump Game I. Just need a step parameter and assume there is no "0" value in the array. 1 class Solution { 2 public: 3 int jump(int A[], ...
分类:其他好文   时间:2015-03-20 06:55:43    阅读次数:124
LeetCode – Refresh – Insertion Sort List
Do not forget to break the inner loop, when you find the insert position. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * ...
分类:其他好文   时间:2015-03-20 06:56:19    阅读次数:120
LeetCode – Refresh – Intersection of Two Linked Lists
Find the common length part, then check with two pointers. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *...
分类:其他好文   时间:2015-03-20 06:57:04    阅读次数:135
LeetCode – Refresh – Interleaving String
Notes:1. Even s3 is empty string, if s1 and s2 are emtpy, then it should be true.2. Do not mess up the size of label. 1 class Solution { 2 public: 3 ....
分类:其他好文   时间:2015-03-20 06:54:54    阅读次数:115
前缀、中缀、后缀表达式
它们之间的区别在于运算符相对与操作数的位置不同。将中缀表达式转换为前缀表达式:遵循以下步骤:(1) 初始化两个栈:运算符栈S1和储存中间结果的栈S2;(2) 从右至左扫描中缀表达式;(3) 遇到操作数时,将其压入S2;(4) 遇到运算符时,比较其与S1栈顶运算符的优先级:(4-1) 如果S1为空,或...
分类:其他好文   时间:2015-03-20 06:54:53    阅读次数:165
基于libVLC(VLC SDK)的视频播放Demo
由于实习项目需要,最近在研究VLC Media Player,该播放器来源于École Centrale Paris(巴黎中央理工学校)的一个学术项目,名为VideoLAN,VLC意为VideoLAN Client。后发展为一个由志愿者组成的非营利性组织,开发并提供免费、开源的多媒体解决方案。我的工...
分类:其他好文   时间:2015-03-20 06:53:18    阅读次数:1049
LeetCode – Refresh – Integer to Roman
Pretty straight forward. 1 class Solution { 2 public: 3 string getRoman(int n, char ten, char five, char one) { 4 string result; 5 ...
分类:其他好文   时间:2015-03-20 06:53:42    阅读次数:124
LeetCode – Refresh – Jump Game
Need a corner case check for only one element [0]. 1 class Solution { 2 public: 3 bool canJump(int A[], int n) { 4 if (n = n-1) return tru...
分类:其他好文   时间:2015-03-20 06:51:03    阅读次数:127
LeetCode – Refresh – Insert Inverval
Similar to merge intervals. But this is easier than merge interval, because every side is kind of "sorted". 1 /** 2 * Definition for an interval. 3 .....
分类:其他好文   时间:2015-03-20 06:50:10    阅读次数:123
【PAT】2-2 一元多项式求
#include #include #include #include #include #include #include #include using namespace std;#define read() freopen("in.txt", "r", stdin)#define write(...
分类:其他好文   时间:2015-03-20 06:47:40    阅读次数:121
美又发枪击案 警方全城搜捕嫌犯
美又发枪击案 警方全城搜捕嫌犯 美又发枪击案 警方全城搜捕嫌犯 http://www.ebay.de/cln/qya.x5f5a/2015-03-20/190220104013http://www.ebay.de/cln/stxd393/2015-03-20/190118568011http://w...
分类:其他好文   时间:2015-03-20 06:46:52    阅读次数:78
定制文件夹选择对话框的样式和大小实现方法
前面讲过了两种风格的文件夹选择对话框的实现方法,见文章《Win7界面的和API实现的老界面文件夹选择对话框代码实现详细讲解》。而老界面的文件夹选择对话框很小,也导致选择很不方便,所以很多人就不喜欢这种对话框了。但是今天讲的定制这种文件夹选择对话框的样式和大小,或许可以大大提升用户体验吧。嘿嘿。 .....
分类:其他好文   时间:2015-03-20 06:46:45    阅读次数:390
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!