上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 54 下一页
摘要: Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some 阅读全文
posted @ 2020-12-01 12:30 北叶青藤 阅读(102) 评论(0) 推荐(0)
摘要: In an N by N square grid, each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and only if it is c 阅读全文
posted @ 2020-09-22 02:29 北叶青藤 阅读(218) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an ancesto 阅读全文
posted @ 2020-04-05 10:46 北叶青藤 阅读(268) 评论(0) 推荐(0)
摘要: In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want to max 阅读全文
posted @ 2020-03-15 09:45 北叶青藤 阅读(165) 评论(0) 推荐(0)
摘要: 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 北叶青藤 阅读(242) 评论(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 北叶青藤 阅读(177) 评论(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 北叶青藤 阅读(274) 评论(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 北叶青藤 阅读(175) 评论(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 北叶青藤 阅读(222) 评论(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 北叶青藤 阅读(201) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 54 下一页