上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 53 下一页
摘要: Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and  阅读全文
posted @ 2020-03-15 08:29 北叶青藤 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[ 阅读全文
posted @ 2020-03-13 15:22 北叶青藤 阅读(172) 评论(0) 推荐(0) 编辑
摘要: There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
posted @ 2020-03-11 12:18 北叶青藤 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only if i 阅读全文
posted @ 2020-03-07 15:07 北叶青藤 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The 阅读全文
posted @ 2020-03-05 15:16 北叶青藤 阅读(218) 评论(0) 推荐(0) 编辑
摘要: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' 阅读全文
posted @ 2020-03-03 15:40 北叶青藤 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversa 阅读全文
posted @ 2020-02-18 07:30 北叶青藤 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Imagine you have an array like this (note that the array has duplicates, and includes 0 and k): a = [ 4, 64, 200, 42, 56, 22, 1, 64, 0, 161, 200, 0, 4 阅读全文
posted @ 2020-02-18 07:08 北叶青藤 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a string s and an integer k, find out if the given string is a K-Palindrome or not. A string is K-Palindrome if it can be transformed into a pal 阅读全文
posted @ 2020-02-08 00:04 北叶青藤 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Given a matrix, like this[[0, 0, 1, 1, 1][0, 1, 1, 1, 1][0, 0, 1, 1, 1][0, 0, 0, 0, 0]]each cell is either 1 or 0in each row, from left to right, when 阅读全文
posted @ 2020-02-07 11:18 北叶青藤 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 53 下一页