xinyu04

导航

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页

2022年8月1日 #

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) 编辑

2022年7月31日 #

LeetCode 986 Interval List Intersections 模拟

摘要: You are given two lists of closed intervals, firstList and secondList, where firstList[i] = [starti, endi] and secondList[j] = [startj, endj]. Each li 阅读全文

posted @ 2022-07-31 16:59 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

MathProblem 18 Sideways tank of gas problem

摘要: The gas tank of a truck is cylindrical in shape with a radius of r inches and a lengh of l inches, and tank lays on its side. With a measuring stick y 阅读全文

posted @ 2022-07-31 05:37 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

MathProblem 16 Two coins problem

摘要: A box contains two coins. One coin is heads on both sides and the other is heads on one side and tails on the other. One coin is selected from the box 阅读全文

posted @ 2022-07-31 05:08 Blackzxy 阅读(18) 评论(0) 推荐(0) 编辑

LeetCode 139 Word Break DP+map

摘要: Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary wor 阅读全文

posted @ 2022-07-31 03:38 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

MathProblem 14 Four pints of beer problem

摘要: A bartender has a $3$ pint glass and a $5$ pint glass. A customer walks in and orders $4$ pints of beer. Without a measuring cup but with an unlimited 阅读全文

posted @ 2022-07-31 00:36 Blackzxy 阅读(15) 评论(0) 推荐(0) 编辑

2022年7月30日 #

MathProblem 13 Wine and cigar problem

摘要: Joe's happiness is proportional to the function $w^2*c$ ($w$ squared * $c$), where $w$ stands for daily consumption of glasses of wine, and $c$ stands 阅读全文

posted @ 2022-07-30 23:45 Blackzxy 阅读(14) 评论(0) 推荐(0) 编辑

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页