leetcode-python
文章平均质量分 55
学习笔记
Sterben_Da
这个作者很懒,什么都没留下…
展开
-
155. Min Stack
155. Min Stack原创 2022-06-15 21:49:17 · 123 阅读 · 1 评论 -
769. Max Chunks To Make Sorted
769. Max Chunks To Make Sorted原创 2022-06-15 17:21:51 · 153 阅读 · 0 评论 -
240. Search a 2D Matrix II
240. Search a 2D Matrix II原创 2022-06-15 11:43:15 · 160 阅读 · 0 评论 -
448. Find All Numbers Disappeared in an Array
448. Find All Numbers Disappeared in an Array原创 2022-06-14 17:41:04 · 144 阅读 · 0 评论 -
260. Single Number III
260. Single Number III原创 2022-06-14 16:23:43 · 108 阅读 · 0 评论 -
476. Number Complement
476. Number Complement原创 2022-06-13 16:55:48 · 81 阅读 · 0 评论 -
693. Binary Number with Alternating Bits
693. Binary Number with Alternating Bits原创 2022-06-13 16:28:11 · 80 阅读 · 0 评论 -
268. Missing Number
268. Missing Number原创 2022-06-13 15:00:14 · 84 阅读 · 0 评论 -
338. Counting Bits
338. Counting Bits原创 2022-06-13 14:44:48 · 115 阅读 · 0 评论 -
318. Maximum Product of Word Lengths
318. Maximum Product of Word Lengths原创 2022-06-10 17:06:00 · 117 阅读 · 0 评论 -
342. Power of Four
342. Power of Four原创 2022-06-10 11:05:09 · 107 阅读 · 0 评论 -
190. Reverse Bits
190. Reverse Bits原创 2022-06-09 16:53:53 · 93 阅读 · 0 评论 -
461. Hamming Distance
461. Hamming Distance原创 2022-06-09 16:18:33 · 89 阅读 · 0 评论 -
241. Different Ways to Add Parentheses
241. Different Ways to Add Parentheses原创 2022-06-08 16:42:14 · 121 阅读 · 0 评论 -
310. Minimum Height Trees
310. Minimum Height Trees原创 2022-06-08 11:57:39 · 81 阅读 · 0 评论 -
47. Permutations II
47. Permutations II原创 2022-06-02 11:26:37 · 90 阅读 · 0 评论 -
257. Binary Tree Paths
257. Binary Tree Paths原创 2022-06-01 18:30:12 · 102 阅读 · 0 评论 -
130. Surrounded Regions
130. Surrounded Regions原创 2022-06-01 17:41:20 · 119 阅读 · 0 评论 -
934. Shortest Bridge
934. Shortest Bridge原创 2022-05-31 21:23:57 · 110 阅读 · 0 评论 -
46. Permutations
46.PermutationsMedium10629190Add to ListShareGiven an arraynumsof distinct integers, returnall the possible permutations. You can return the answer inany order.Example 1:Input: nums = [1,2,3]Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,...原创 2022-05-30 21:26:15 · 109 阅读 · 0 评论 -
417. Pacific Atlantic Water Flow
417.Pacific Atlantic Water FlowMedium3734840Add to ListShareThere is anm x nrectangular island that borders both thePacific OceanandAtlantic Ocean. ThePacific Oceantouches the island's left and top edges, and theAtlantic Oceantouches the is...原创 2022-05-30 18:13:23 · 137 阅读 · 0 评论 -
547. Number of Provinces
547.Number of ProvincesMedium5181239Add to ListShareThere arencities. Some of them are connected, while some are not. If cityais connected directly with cityb, and citybis connected directly with cityc, then cityais connected indirectly wi...原创 2022-05-27 17:16:02 · 134 阅读 · 0 评论 -
695. Max Area of Island
695.Max Area of IslandMedium6048149Add to ListShareYou are given anm x nbinary matrixgrid. An island is a group of1's (representing land) connected4-directionally(horizontal or vertical.) You may assume all four edges of the grid are surrounde...原创 2022-05-27 15:41:37 · 69 阅读 · 0 评论 -
540. Single Element in a Sorted Array
540.Single Element in a Sorted ArrayMedium5195111Add to ListShareYou are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once.Returnthe single element that a..原创 2022-05-27 10:55:38 · 81 阅读 · 0 评论 -
154. Find Minimum in Rotated Sorted Array II
154.Find Minimum in Rotated Sorted Array IIHard2931376Add to ListShareSuppose an array of lengthnsorted in ascending order isrotatedbetween1andntimes. For example, the arraynums = [0,1,4,4,5,6,7]might become:[4,5,6,7,0,1,4]if it was rot...原创 2022-05-26 16:47:57 · 118 阅读 · 0 评论 -
153. Find Minimum in Rotated Sorted Array
153.Find Minimum in Rotated Sorted ArrayMedium6883394Add to ListShareSuppose an array of lengthnsorted in ascending order isrotatedbetween1andntimes. For example, the arraynums = [0,1,2,4,5,6,7]might become:[4,5,6,7,0,1,2]if it was rota...原创 2022-05-26 15:58:33 · 157 阅读 · 0 评论 -
34. Find First and Last Position of Element in Sorted Array
34.Find First and Last Position of Element in Sorted ArrayMedium10708294Add to ListShareGiven an array of integersnumssorted in non-decreasing order, find the starting and ending position of a giventargetvalue.Iftargetis not found in the arr...原创 2022-05-24 15:41:14 · 123 阅读 · 0 评论 -
69. Sqrt(x)
69.Sqrt(x)Easy38523211Add to ListShareGiven a non-negative integerx,compute and returnthe square root ofx.Since the return typeis an integer, the decimal digits aretruncated, and onlythe integer partof the resultis returned.Note:You ar...原创 2022-05-23 21:19:01 · 105 阅读 · 0 评论 -
524. Longest Word in Dictionary through Deleting
524.Longest Word in Dictionary through DeletingMedium1337331Add to ListShareGiven a stringsand a string arraydictionary, returnthe longest string in the dictionary that can be formed by deleting some of the given string characters. If there is m...原创 2022-05-23 20:50:15 · 90 阅读 · 0 评论 -
403. Frog Jump
403.Frog JumpHard2544163Add to ListShareA frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water.Given a lis.原创 2022-05-22 00:08:03 · 93 阅读 · 0 评论 -
680. Valid Palindrome II
680. Valid Palindrome IIEasy5621303Add to ListShareGiven a string s, return true if the s can be palindrome after deleting at most one character from it.Example 1:Input: s = "aba"Output: trueExample 2:Input: s = "abca"Output: trueExpl原创 2022-05-16 00:26:37 · 85 阅读 · 0 评论 -
633. Sum of Square Numbers
633.Sum of Square NumbersMedium1411468Add to ListShareGiven a non-negative integerc, decide whether there're two integersaandbsuch thata2+ b2= c.Example 1:Input: c = 5Output: trueExplanation: 1 * 1 + 2 * 2 = 5Example 2:Input: ...原创 2022-05-14 23:55:15 · 128 阅读 · 0 评论 -
76. Minimum Window Substring
76.Minimum Window SubstringHard10234535Add to ListShareGiven two stringssandtof lengthsmandnrespectively, returntheminimum window substringofssuch that every character int(including duplicates) is included in the window. If there is n...原创 2022-05-14 20:41:24 · 143 阅读 · 0 评论 -
142. Linked List Cycle II
142.Linked List Cycle IIMedium7195472Add to ListShareGiven theheadof a linked list, returnthe node where the cycle begins. If there is no cycle, returnnull.There is a cycle in a linked list if there is some node in the list that can be reached...原创 2022-05-08 22:36:48 · 99 阅读 · 0 评论 -
88. Merge Sorted Array
88.Merge Sorted ArrayEasy4434428Add to ListShareYou are given two integer arraysnums1andnums2, sorted innon-decreasing order, and two integersmandn, representing the number of elements innums1andnums2respectively.Mergenums1andnums2i...原创 2022-05-04 23:58:41 · 133 阅读 · 0 评论 -
167. Two Sum II - Input Array Is Sorted
167.Two Sum II - Input Array Is SortedMedium5322934Add to ListShareGiven a1-indexedarray of integersnumbersthat is alreadysorted in non-decreasing order, find two numbers such that they add up to a specifictargetnumber. Let these two numbers ...原创 2022-05-04 22:25:08 · 261 阅读 · 0 评论 -
665. Non-decreasing Array
665.Non-decreasing ArrayMedium3584664Add to ListShareGiven an arraynumswithnintegers, your task is to check if it could become non-decreasing by modifyingat most one element.We define an array is non-decreasing ifnums[i] <= nums[i + 1]ho...转载 2022-05-03 23:41:29 · 86 阅读 · 0 评论 -
763. Partition Labels
763.Partition LabelsMedium7591287Add to ListShareYou are given a strings. We want to partition the string into as many parts as possible so that each letter appears in at most one part.Note that the partition is done so that after concatenating a..转载 2022-04-27 00:08:55 · 93 阅读 · 0 评论 -
452. Minimum Number of Arrows to Burst Balloons
452.Minimum Number of Arrows to Burst BalloonsMedium337898Add to ListShareThere are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer arraypointswherepoints[i] = [xstart, xen...转载 2022-04-24 22:22:45 · 123 阅读 · 0 评论 -
605. Can Place Flowers
605.Can Place FlowersEasy2871643Add to ListShareYou have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted inadjacentplots.Given an integer arrayflowerbedcontaining0's and1's, where...原创 2022-04-24 20:44:30 · 275 阅读 · 0 评论