07 2021 档案

摘要:Given an array nums, partition it into two (contiguous) subarrays left and right so that: Every element in left is less than or equal to every element 阅读全文
posted @ 2021-07-23 05:25 Schwifty 阅读(41) 评论(0) 推荐(0)
摘要:There are n dominoes in a line, and we place each domino vertically upright. In the beginning, we simultaneously push some of the dominoes either to t 阅读全文
posted @ 2021-07-22 06:29 Schwifty 阅读(41) 评论(0) 推荐(0)
摘要:A string s is called good if there are no two different characters in s that have the same frequency. Given a string s, return the minimum number of c 阅读全文
posted @ 2021-07-21 05:08 Schwifty 阅读(336) 评论(0) 推荐(0)
摘要:Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring  阅读全文
posted @ 2021-07-20 10:31 Schwifty 阅读(40) 评论(0) 推荐(0)
摘要:You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing water) and 1's (representing land). An island is a group of  阅读全文
posted @ 2021-07-16 07:46 Schwifty 阅读(44) 评论(0) 推荐(0)
摘要:order and str are strings composed of lowercase letters. In order, no letter occurs more than once. order was sorted in some custom order previously. 阅读全文
posted @ 2021-07-14 23:59 Schwifty 阅读(33) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-14 12:35 Schwifty 阅读(34) 评论(0) 推荐(0)
摘要:Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be  阅读全文
posted @ 2021-07-13 04:44 Schwifty 阅读(34) 评论(0) 推荐(0)
摘要: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], 阅读全文
posted @ 2021-07-09 00:12 Schwifty 阅读(36) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-07 00:50 Schwifty 阅读(29) 评论(0) 推荐(0)
摘要: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 ( 阅读全文
posted @ 2021-07-05 08:49 Schwifty 阅读(40) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-04 11:13 Schwifty 阅读(46) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-03 07:40 Schwifty 阅读(25) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-02 04:36 Schwifty 阅读(33) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-01 23:15 Schwifty 阅读(50) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-01 03:42 Schwifty 阅读(38) 评论(0) 推荐(0)