码迷,mamicode.com
首页 >  
搜索关键字:refresh    ( 1347个结果
LeetCode - Refresh - Path Sum II
Same with I 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * ...
分类:其他好文   时间:2015-03-21 18:25:44    阅读次数:148
LeetCode – Refresh – Palindrome Partitioning II
Notes:1. If len dp(len+1, 0); 7 vector > rec(len, vector(len, false)); 8 for (int i = 0; i = 0; i--) {10 for (int j = i; ...
分类:其他好文   时间:2015-03-21 18:25:43    阅读次数:136
LeetCode – Refresh – Palindrome Partitioning I
1 class Solution { 2 public: 3 bool isP(string s) { 4 int start = 0, end = s.size()-1; 5 while (start > &result, vector current,...
分类:其他好文   时间:2015-03-21 17:02:38    阅读次数:116
LeetCode – Refresh – One Edit Distance
Scanning from start to end. If find a mismatch and one is larger size, keep search from the previous char of shorter one.Finally check whether found a...
分类:其他好文   时间:2015-03-21 16:56:01    阅读次数:142
LeetCode – Refresh – Palindrome Number
1. x/rec >= 10.2. find start and end of a number. 1 class Solution { 2 public: 3 bool isPalindrome(int x) { 4 if (x = 10) rec *= 10; 7 ...
分类:其他好文   时间:2015-03-21 16:54:58    阅读次数:122
SSH 之 Spring的源码(二)——Bean实例化
首先来看一段代码,看过上一节的朋友肯定对这段代码并不陌生。这一段代码诠释了Spring加载bean的完整过程,包括读取配置文件,扫描包,加载类,实例化bean,注入bean属性依赖。 public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShut...
分类:编程语言   时间:2015-03-21 14:03:27    阅读次数:155
LeetCode – Refresh – Number of 1 Bits
1 class Solution { 2 public: 3 int hammingWeight(uint32_t n) { 4 int result = 0; 5 while (n > 0) { 6 if (n & 1) { 7 ...
分类:其他好文   时间:2015-03-21 11:10:00    阅读次数:147
LeetCode – Refresh – Next Permutation
1 class Solution { 2 public: 3 void swap(int &a, int &b){int t = a; a = b; b = t;}; 4 void reverse(vector &num, int start, int end) { 5 ...
分类:其他好文   时间:2015-03-21 11:00:51    阅读次数:98
LeetCode – Refresh – Multiply Strings
Notes:1. Dont have to allocate l1*l2, just l1+l2 is fare enough.2. remember i--, j--.3. upgrade[i+j] is += not = rec[i+j+1]/10; 1 class Solution { 2 p...
分类:其他好文   时间:2015-03-21 09:45:21    阅读次数:117
LeetCode – Refresh – N-Queens
Brute Force: 1 class Solution { 2 public: 3 bool notExist(vector rec, int level, int current) { 4 for (int i = 0; i rec, vector &result) ...
分类:其他好文   时间:2015-03-21 09:44:49    阅读次数:115
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!