Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most one 0. Example 1: Note: The input array will onl ...
分类:
其他好文 时间:
2017-03-07 08:46:32
阅读次数:
260
Write a SQL query to find all numbers that appear at least three times consecutively. For example, given the above Logs table, 1 is the only number th ...
分类:
数据库 时间:
2017-03-03 01:08:37
阅读次数:
177
Write a function to find the longest common prefix(前缀) string amongst an array of strings. 注意strs[i][j]不要超出范围 ...
分类:
其他好文 时间:
2017-03-02 11:25:29
阅读次数:
129
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24498 Accepted: 13326 Description Some positive integers c ...
分类:
其他好文 时间:
2017-02-28 19:29:00
阅读次数:
236
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: class Solution { ...
分类:
编程语言 时间:
2017-02-28 18:59:56
阅读次数:
195
https://leetcode.com/problems/longest-consecutive-sequence/?tab=Description 开始的时候,没有思路。看了下面这个,也有并查集的感觉,每个数字记录一下最后一个元素。都指向一个。 https://discuss.leetcode. ...
分类:
其他好文 时间:
2017-02-27 00:46:33
阅读次数:
160
Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the longest consecu ...
分类:
其他好文 时间:
2017-02-23 20:51:23
阅读次数:
209
516. Longest Palindromic Subsequence Add to List 516. Longest Palindromic Subsequence Add to List Add to List Description Submission Solutions Total A ...
分类:
其他好文 时间:
2017-02-20 10:46:26
阅读次数:
204
1. BinaryGap Find longest sequence of zeros in binary representation of an integer. ...
分类:
其他好文 时间:
2017-02-18 14:33:20
阅读次数:
184
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1.The length o ...
分类:
其他好文 时间:
2017-02-17 18:04:46
阅读次数:
151