上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 64 下一页
摘要: Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to 阅读全文
posted @ 2020-04-03 15:51 CNoodle 阅读(210) 评论(0) 推荐(0)
摘要: Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order. An Anagram is a word 阅读全文
posted @ 2020-04-03 14:57 CNoodle 阅读(256) 评论(0) 推荐(0)
摘要: Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1: Input: s = "eceba" Output: 3 Ex 阅读全文
posted @ 2020-04-03 10:03 CNoodle 阅读(349) 评论(0) 推荐(0)
摘要: Given a string s and an integer k, return the length of the longest substring of s that contains at most k distinct characters. Example 1: Input: s = 阅读全文
posted @ 2020-04-03 09:48 CNoodle 阅读(239) 评论(0) 推荐(0)
摘要: Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The a 阅读全文
posted @ 2020-04-03 08:29 CNoodle 阅读(489) 评论(0) 推荐(0)
摘要: Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicat 阅读全文
posted @ 2020-04-03 07:02 CNoodle 阅读(614) 评论(0) 推荐(0)
摘要: 最小窗口子串。题意是给两个字符串S和T,T比较短。请输出一个最小的S的子串,包含了T中出现的所有字母。例子, Example: Input: S = "ADOBECODEBANC", T = "ABC" Output: "BANC" 这个题因为有时间复杂度的要求所以只能用到一个叫做滑动窗口的思想。在 阅读全文
posted @ 2020-04-03 06:23 CNoodle 阅读(149) 评论(0) 推荐(0)
摘要: Given an integer array nums where every element appears three times except for one, which appears exactly once. Find the single element and return it. 阅读全文
posted @ 2020-04-02 01:47 CNoodle 阅读(447) 评论(0) 推荐(0)
摘要: Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linea 阅读全文
posted @ 2020-04-02 01:35 CNoodle 阅读(487) 评论(0) 推荐(0)
摘要: Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid. The following rules define a valid string: An 阅读全文
posted @ 2020-04-01 13:39 CNoodle 阅读(268) 评论(0) 推荐(0)
摘要: You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots. Given an int 阅读全文
posted @ 2020-04-01 05:25 CNoodle 阅读(173) 评论(0) 推荐(0)
摘要: A string is a valid parentheses string (denoted VPS) if and only if it consists of "(" and ")" characters only, and: It is the empty string, or It can 阅读全文
posted @ 2020-04-01 02:34 CNoodle 阅读(389) 评论(0) 推荐(0)
摘要: Given an m x n matrix board where each cell is a battleship 'X' or empty '.', return the number of the battleships on board. Battleships can only be p 阅读全文
posted @ 2020-04-01 01:32 CNoodle 阅读(177) 评论(0) 推荐(0)
摘要: Given a string array words, return an array of all characters that show up in all strings within the words (including duplicates). You may return the 阅读全文
posted @ 2020-03-31 08:45 CNoodle 阅读(208) 评论(0) 推荐(0)
摘要: Given an array of integers nums, sort the array in ascending order and return it. You must solve the problem without using any built-in functions in O 阅读全文
posted @ 2020-03-31 01:54 CNoodle 阅读(258) 评论(0) 推荐(0)
摘要: Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in b 阅读全文
posted @ 2020-03-30 14:40 CNoodle 阅读(147) 评论(0) 推荐(0)
摘要: Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the resu 阅读全文
posted @ 2020-03-30 07:20 CNoodle 阅读(189) 评论(0) 推荐(0)
摘要: Given a list of words, we may encode it by writing a reference string S and a list of indexes A. For example, if the list of words is ["time", "me", " 阅读全文
posted @ 2020-03-28 13:43 CNoodle 阅读(239) 评论(0) 推荐(0)
摘要: You are given an 8 x 8 matrix representing a chessboard. There is exactly one white rook represented by 'R', some number of white bishops 'B', and som 阅读全文
posted @ 2020-03-27 02:19 CNoodle 阅读(191) 评论(0) 推荐(0)
摘要: Given two binary strings a and b, return their sum as a binary string. Example 1: Input: a = "11", b = "1" Output: "100" Example 2: Input: a = "1010", 阅读全文
posted @ 2020-03-27 01:29 CNoodle 阅读(414) 评论(0) 推荐(0)
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 64 下一页