xinyu04

导航

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 30 下一页

2022年8月11日 #

LeetCode 42 Trapping Rain Water 双指针+思维

摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Soluti 阅读全文

posted @ 2022-08-11 16:42 Blackzxy 阅读(7) 评论(0) 推荐(0) 编辑

LeetCode 5 Longest Palindromic Substring

摘要: Given a string s, return the longest palindromic substring in s. Solution 求在 $s$ 中的最长回文字串。对于每一个位置,进行左右拓展,计算出长度并更新答案即可。 $Notes:$ 对于奇数或者偶数长度的字串,为了统一: 奇数 阅读全文

posted @ 2022-08-11 02:40 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

2022年8月10日 #

LeetCode 17 Letter Combinations of a Phone Number

摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any 阅读全文

posted @ 2022-08-10 15:39 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

LeetCode 40 Combination Sum II 回溯

摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文

posted @ 2022-08-10 02:29 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

2022年8月8日 #

LeetCode 39 Combination Sum 回溯

摘要: Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen nu 阅读全文

posted @ 2022-08-08 18:46 Blackzxy 阅读(11) 评论(0) 推荐(0) 编辑

2022年8月7日 #

LeetCode 47 Permutations II 可重集全排列

摘要: Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Solution 对于有重复元素的全排列,我们用 $se 阅读全文

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

LeetCode 90 Subsets II 回溯

摘要: Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subs 阅读全文

posted @ 2022-08-07 04:53 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

LeetCode 797 All Paths From Source to Target 回溯

摘要: Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths from node 0 to node n - 1 and return them in any orde 阅读全文

posted @ 2022-08-07 02:59 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

2022年8月4日 #

LeetCode 1091 Shortest Path in Binary Matrix

摘要: Given an n x n binary matrix grid, return the length of the shortest clear path in the matrix. If there is no clear path, return -1. A clear path in a 阅读全文

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

MathProblem 23 Fork in the road problem

摘要: You are traveling down a path and come to a fork in the road. A sign lays fallen at the path indicating that one path leads to a village where everyon 阅读全文

posted @ 2022-08-04 06:33 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 30 下一页