xinyu04

导航

2022年8月1日 #

LeetCode 209 Minimum Size Subarray Sum 滑动窗口 & 二分答案

摘要: Given an array of positive integers nums and a positive integer target, return the minimal length of a contiguous subarray [numsl, numsl+1, ..., numsr 阅读全文

posted @ 2022-08-01 23:56 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

LeetCode 713 Subarray Product Less Than K 滑动窗口

摘要: Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in the subarray is s 阅读全文

posted @ 2022-08-01 18:15 Blackzxy 阅读(17) 评论(0) 推荐(0) 编辑

LeetCode 438 Find All Anagrams in a String 滑动窗口

摘要: 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 wo 阅读全文

posted @ 2022-08-01 17:28 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

MathProblem 19 Balls and an urn problem #1

摘要: You have an urn with four balls of different colors. Randomly you draw two at a time, then painting the first ball to match the second. What is the ex 阅读全文

posted @ 2022-08-01 06:37 Blackzxy 阅读(45) 评论(0) 推荐(0) 编辑

LeetCode 140 Word Break II 记忆化搜索 [Hard]

摘要: Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all 阅读全文

posted @ 2022-08-01 03:53 Blackzxy 阅读(5) 评论(0) 推荐(0) 编辑