- 博客(259)
- 资源 (1)
- 收藏
- 关注
原创 448. Find All Numbers Disappeared in an Array
448. Find All Numbers Disappeared in an Array
2022-06-14 17:41:04 191
原创 693. Binary Number with Alternating Bits
693. Binary Number with Alternating Bits
2022-06-13 16:28:11 97
原创 318. Maximum Product of Word Lengths
318. Maximum Product of Word Lengths
2022-06-10 17:06:00 163
原创 241. Different Ways to Add Parentheses
241. Different Ways to Add Parentheses
2022-06-08 16:42:14 174
原创 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 128
原创 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 182
原创 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 155
原创 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 92
原创 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 99
原创 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 184
原创 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 200
原创 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 199
原创 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 125
原创 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 108
原创 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 119
原创 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 98
原创 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 170
原创 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 184
原创 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 162
原创 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 152
原创 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 288
转载 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 110
转载 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 108
转载 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 163
原创 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 313
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人