#单词拆分II#给一字串s和单词的字典dict,在字串中增加空格来构建一个句子,并且所有单词都来自字典。#返回所有有可能的句子。#EXAMPLE:#给一字串lintcode,字典为["de", "ding", "co", "code", "lint"]#结果为["lint code", "lint ...
分类:
其他好文 时间:
2019-01-24 13:31:03
阅读次数:
111
import sys import platform from setuptools import setup, find_packages def get_test_deps(): test_deps = [ 'pylint == 1.7.2', 'mock == 2.0.0', 'pytest-... ...
分类:
编程语言 时间:
2018-08-27 21:56:32
阅读次数:
207
Description For the given binary tree, return a deep copy of it. Description Description For the given binary tree, return a deep copy of it. For the ...
分类:
编程语言 时间:
2018-07-14 14:42:00
阅读次数:
134
POJ 1961 最小循环节的一个简化版本,按标准KMP算法求一遍失配函数即可得解。 ...
分类:
其他好文 时间:
2018-04-30 11:45:03
阅读次数:
160
题目链接:http://www.lintcode.com/zh-cn/problem/max-points-on-a-line/# 条件:给一个点数组 目标:求出共线的点的最多个数 实现:时间复杂度——O(n^2) 要考虑的特殊情况是:①有相同点(这个也太特喵隐蔽了)②斜率不存在的点 思路:暴力求解 ...
分类:
其他好文 时间:
2016-12-15 07:23:36
阅读次数:
221
单词切分 给出一个字符串s和一个词典,判断字符串s是否可以被空格切分成一个或多个出现在字典中的单词。 样例 s = "lintcode" dict = ["lint","code"] 返回 true 因为"lintcode"可以被空格切分成"lint code" 解题 DFS if((s==null ...
分类:
其他好文 时间:
2016-03-23 21:45:33
阅读次数:
355
LintCode - Add Two Numbers...
分类:
其他好文 时间:
2015-07-24 13:01:04
阅读次数:
143