码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
5. Longest Palindromic Substring
题目:最长的回文串 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: 解答 ...
分类:其他好文   时间:2019-03-10 11:14:21    阅读次数:126
104. Maximum Depth of Binary Tree
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 l ...
分类:其他好文   时间:2019-03-10 09:19:40    阅读次数:146
600. Non-negative Integers without Consecutive Ones
Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive ...
分类:其他好文   时间:2019-03-09 23:16:42    阅读次数:170
32. Longest Valid Parentheses
https://www.cnblogs.com/grandyang/p/4424731.html 这个题求的是最长的连续匹配正确的符号 匹配错误只可能是右括号')'存在时,堆中没有左括号'('进行匹配 start用来继续这个连续匹配的开始位置,只有在匹配错误的情况下,这个start才更新 如果匹配成 ...
分类:其他好文   时间:2019-03-09 12:53:23    阅读次数:203
LeetCode算法题-Longest Harmonious Subsequence(Java实现)
这是悦乐书的第 270 次更新,第 284 篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第136题(顺位题号是594)。我们定义一个和谐数组是一个数组,其最大值和最小值之间的差值恰好为1。给定一个整数数组,在其所有可能的子序列中找到其最长的和谐子序列的长度。例如: 输 ...
分类:编程语言   时间:2019-03-08 09:15:25    阅读次数:190
一道vector实现字典的题目 C++
使用vector 在解决一些问题的时候确实非常高效。 可以不像Array 那样一个一个去查。 可以大幅度缩减代码实现的时间。 Given a string, find the length of the longest substring without repeating characters. ...
分类:编程语言   时间:2019-03-06 09:21:25    阅读次数:280
Leetcode经典试题:Longest Substring Without Repeating Characters解析
题目如下: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The a ...
分类:其他好文   时间:2019-03-06 09:20:37    阅读次数:161
【leetcode】995. Minimum Number of K Consecutive Bit Flips
题目如下: In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of length K and simultaneously changing every ...
分类:其他好文   时间:2019-03-05 15:32:36    阅读次数:213
19.3.5 [LeetCode 104] Maximum Depth of Binary Tree
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 l ...
分类:其他好文   时间:2019-03-05 11:15:23    阅读次数:140
[LeetCode] 1004. Max Consecutive Ones III
Given an array A of 0s and 1s, we may change up to K values from 0 to 1. Return the length of the longest (contiguous) subarray that contains only 1s. ...
分类:其他好文   时间:2019-03-04 09:50:29    阅读次数:92
3017条   上一页 1 ... 39 40 41 42 43 ... 302 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!