码迷,mamicode.com
首页 >  
搜索关键字:lintcode    ( 1584个结果
DFS-20190206
找出所有方案 排列和组合问题 排列: https://www.lintcode.com/problem/combination-sum/description 1 public class Solution { 2 /** 3 * @param candidates: A list of integ ...
分类:其他好文   时间:2019-02-07 09:31:58    阅读次数:125
LintCode上的一道算法面试题: 数字的统计
说到数字的统计,小时候的数学课大家都应该有学过,但数字太多太复杂的,手动肯定耗时间不说还很容易出错。所以今天分享一下如何用程序来完成。 Have you met this question in a real interview? 你是否在真实的采访中遇到过这个问题? Count the numbe ...
分类:编程语言   时间:2019-01-29 18:19:03    阅读次数:191
单词拆分II
#单词拆分II#给一字串s和单词的字典dict,在字串中增加空格来构建一个句子,并且所有单词都来自字典。#返回所有有可能的句子。#EXAMPLE:#给一字串lintcode,字典为["de", "ding", "co", "code", "lint"]#结果为["lint code", "lint ...
分类:其他好文   时间:2019-01-24 13:31:03    阅读次数:111
[LintCode]76. Longest Increasing Subsequence
public class Solution { / @param nums: An integer array @return: The length of LIS (longest increasing subsequence) / public int longestIncreasingSubs ...
分类:其他好文   时间:2019-01-16 13:18:18    阅读次数:185
[LintCode]117. Jump Game II
``` Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your m... ...
分类:其他好文   时间:2019-01-16 13:13:05    阅读次数:146
LintCode 练习题
/** * 给定一个链表,旋转链表,将链表每个节点向右移动 k 个位置,其中 k 是非负数。 示例 1: 输入: 1->2->3->4->5->NULL, k = 2 输出: 4->5->1->2->3->NULL 解释: 向右旋转 1 步: 5->1->2->3->4->NULL 向右旋转 2 步 ...
分类:其他好文   时间:2019-01-11 15:57:39    阅读次数:240
369. Plus One Linked List
/** * Lock by Leetcode * 369. Plus One Linked List * https://www.lintcode.com/problem/plus-one-linked-list/description * * Given a non-negative intege ...
分类:其他好文   时间:2019-01-01 12:27:05    阅读次数:240
[LintCode] Linked List Cycle(带环链表)
描述 给定一个链表,判断它是否有环。 样例 给出 -21->10->4->5, tail connects to node index 1,返回 true。 这里解释下,题目的意思,在英文原题中,tail connects to node index 1 表示的是节点 5 还要链接回索引号 为 1 ...
分类:其他好文   时间:2018-12-16 14:41:38    阅读次数:127
[LintCode] Number of Islands(岛屿个数)
描述 给一个01矩阵,求不同的岛屿的个数。 0代表海,1代表岛,如果两个1相邻,那么这两个1属于同一个岛。我们只考虑上下左右为相邻。 样例 在矩阵: [ [1, 1, 0, 0, 0], [0, 1, 0, 0, 1], [0, 0, 0, 1, 1], [0, 0, 0, 0, 0], [0, 0 ...
分类:其他好文   时间:2018-12-16 14:39:07    阅读次数:162
[LeetCode] 208(LintCode). Implement Trie(Prefix Tree)
Implement a trie with insert, search, and startsWith methods. Notice You may assume that all inputs are consist of lowercase letters a-z. Implement a ...
分类:其他好文   时间:2018-12-15 10:27:01    阅读次数:134
1584条   上一页 1 ... 10 11 12 13 14 ... 159 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!