1 package Today; 2 //LeetCode:485. Max Consecutive Ones 3 /* 4 Given a binary array, find the maximum number of consecutive 1s in this array. 5 6 Exam... ...
分类:
其他好文 时间:
2017-02-06 13:22:30
阅读次数:
155
第三道题,和前面的那个第一道题数组里面的两个元素求和有点像,题目如下: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", ...
分类:
其他好文 时间:
2017-02-05 13:54:06
阅读次数:
177
5. Longest Palindromic Substring 5. Longest Palindromic Substring Total Accepted: 170563 Total Submissions: 688595 Difficulty: Medium Contributors: Ad ...
分类:
其他好文 时间:
2017-02-04 10:58:46
阅读次数:
203
这是一个简单版本of LC 424 Longest Repeating Character Replacement 又是Window, 又是Two Pointers Window还是采用每次都try to update left使得window valid, 每次都检查最大window ...
分类:
其他好文 时间:
2017-02-01 10:48:22
阅读次数:
178
原题链接在这里:https://leetcode.com/problems/max-consecutive-ones/ 题目: Given a binary array, find the maximum number of consecutive 1s in this array. Example ...
分类:
其他好文 时间:
2017-01-31 10:35:08
阅读次数:
176
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2017-01-31 10:33:20
阅读次数:
205
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2017-01-30 10:36:35
阅读次数:
230
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2017-01-26 01:07:28
阅读次数:
198
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 ...
分类:
其他好文 时间:
2017-01-25 22:12:51
阅读次数:
240
题目: 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 farthe ...
分类:
其他好文 时间:
2017-01-25 13:36:46
阅读次数:
187