Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. ...
Let s call any contiguous subarray B of A amountainif the following properties hold: B.length gt There exists some lt i lt B.length such thatB lt B lt ... B i lt B i gt B i gt ... gt B B.length Note ...
2019-03-01 23:49 0 1804 推荐指数:
Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. ...
Given an array `A` of integers, return `true` if and only if it is a *valid mountain array*. Recall that A is a mountain array if and only ...
Given an integer array arr, return the length of a maximum size turbulent subarray of arr. A subarray is turbulent if the comparison sign flips ...
Let's call an array `A` a *mountain* if the following properties hold: A.length >= 3 There exists some 0 < i < A.length ...
(This problem is an interactive problem.) You may recall that an array A is a mountain array if and only if: A.length >= 3 There exists ...
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique ...
longest palindromic substring. 求字符串的最长回文子串 算法 ...
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. ...