码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
让RAC支持进度消息
我们在使用RAC的时候,有时候处理一个主消息之外可能还需要其他的辅助消息。比如说,我们在上次图片或者下载的时候。往往除了需要知道结果,还需要过程的进度。简单的做法就是外部自己创建一个subject,然后给具体做事情的模块来手动设置subject的next值了。这是一个经常用的东西,所以我这边参考了AFNetworking+RACExtension中得代码。自己重建了支持进度的signal和subs...
分类:其他好文   时间:2015-01-12 13:07:11    阅读次数:445
leetcode3 Longest substring whitout repeat characters
求字符串中的最长无重复子串的长度,例如"abcabcbb",最长无重复子串为"abc",长度为3。因为要求无重复,因此想到要用HashMap来保存,因为HashMap的键值不能重复。将要存入的字符作为key,字符在字符串中的下标作为value,如果map中已经存有该字符,则删掉该字符以及字符串中该字符之前的所有字符,然后再存入。例如字符串为"abcbd",如已存入abc,现在要存b,则删掉ab,存...
分类:其他好文   时间:2015-01-12 11:38:25    阅读次数:217
[LeetCode][Python]Longest Substring Without Repeating Characters
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/Given a st...
分类:编程语言   时间:2015-01-12 01:36:33    阅读次数:255
LeetCode No.3 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-01-11 22:58:44    阅读次数:223
Longest Valid Parentheses
难点1,是栈,2是流程class Solution {public: int longestValidParentheses(string s) { stack mstack; char cbefore; int count = 0; if(s.empt...
分类:其他好文   时间:2015-01-11 12:14:33    阅读次数:119
[LeetCode#104, 111]Maximum Depth of Binary Tree, Minimum Depth of Binary Tree
The problem 1: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 t...
分类:其他好文   时间:2015-01-11 06:07:49    阅读次数:216
spring mvc ContentNegotiatingViewResolver 根据路径后缀,选择不同视图
理论 public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport implements ViewResolver, Ordered Implementation of ViewResolver that resolves a view based on the request file name ...
分类:编程语言   时间:2015-01-10 12:43:55    阅读次数:264
[LeetCode] Longest Consecutive Sequence
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 longes...
分类:其他好文   时间:2015-01-09 22:08:16    阅读次数:178
spoj 1812
1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the s...
分类:其他好文   时间:2015-01-09 22:06:32    阅读次数:339
EOJ1189 最小凸包
Once upon a time there was a greedy King who ordered hischief Architect to build a wall around the King's castle. The King was sogreedy, that he would not listen to his Architect's proposals to build ...
分类:其他好文   时间:2015-01-09 19:25:33    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!