zencart批量设置某分类下热卖商品数 best sellerupdate products set products_ordered=products_ordered+10 where master_categories_id=1;update products set products_ord...
分类:
其他好文 时间:
2014-09-15 14:06:28
阅读次数:
148
记录最大的起始位置+hash
int lengthOfLongestSubstring(string s) {
map charMap;
int curLen, maxLen = 0,lastIndex = -1;
for (int i = 0; i < s.size(); i++)
{
if (charMa...
分类:
其他好文 时间:
2014-09-14 12:53:27
阅读次数:
158
实现了两种方法,一种是DP,用循环做的,递归的话更简单。
string longestPalindrome(string s) {
int n = s.size();
bool dp[1001][1001];
int maxl = 1;
int maxs = 0;
for (int i = n - 1; i >= 0...
分类:
其他好文 时间:
2014-09-14 12:53:07
阅读次数:
190
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-09-14 12:49:37
阅读次数:
214
The xor-longest PathTime Limit:2000MSMemory Limit:65536KTotal Submissions:3875Accepted:850DescriptionIn an edge-weighted tree, the xor-length of a pat...
分类:
其他好文 时间:
2014-09-13 23:59:06
阅读次数:
434
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-09-13 20:08:35
阅读次数:
179
HashMap 在leetcode Longest Consecutive Sequence 上巧妙使用。...
分类:
其他好文 时间:
2014-09-13 15:57:45
阅读次数:
144
[leetcode]Longest Common Prefix...
分类:
其他好文 时间:
2014-09-13 10:39:35
阅读次数:
173
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-09-11 20:41:12
阅读次数:
111
class Solution {private: const char sep_char = '\1';public: string longestPalindrome(string s) { int max_len = 0; int len = s....
分类:
其他好文 时间:
2014-09-11 01:06:51
阅读次数:
265