摘要:
You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may 阅读全文
摘要:
Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be 阅读全文
摘要:
Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays. Example 1: Input: nums1 = [1,2,3,2,1], 阅读全文
摘要:
Given an array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of the set 阅读全文
摘要:
Given an integer n, your task is to count how many strings of length n can be formed under the following rules: Each character is a lower case vowel ( 阅读全文
摘要:
Given an m x n matrix matrix and an integer k, return the max sum of a rectangle in the matrix such that its sum is no larger than k. It is guaranteed 阅读全文
摘要:
Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Example:Given bi 阅读全文
摘要:
Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each group of consecutive repeating c 阅读全文
摘要:
Description Given a string of char array and an offset, rotate the string by offset in place. (from left to right).In different languages, str will be 阅读全文
摘要:
Given a set of n people (numbered 1, 2, ..., n), we would like to split everyone into two groups of any size. Each person may dislike some other peopl 阅读全文