LeetCode topics — Array
Data Structure
5 min readFeb 4, 2020
Questions
Basic
- 27. Remove Element
- 26. Remove Duplicates from Sorted Array
- 80. Remove Duplicates from Sorted Array II
- 941. Valid Mountain Array
- 845. Longest Mountain in Array
- 977. Squares of a Sorted Array
- 1089. Duplicate Zeros
- 881. Boats to Save People
- 1423. Maximum Points You Can Obtain from Cards
- 1658. Minimum Operations to Reduce X to Zero
- 1686. Stone Game VI
- 277. Find the Celebrity
- 169. Majority Element
- 229. Majority Element II
- 1150. Check If a Number Is Majority Element in a Sorted Array
- 189. Rotate Array
- 442. Find All Duplicates in an Array
- 448. Find All Numbers Disappeared in an Array
- 1502. Can Make Arithmetic Progression From Sequence
- 41. First Missing Positive
- 299. Bulls and Cows
- 134. Gas Station
- 1685. Sum of Absolute Differences in a Sorted Array
- 349. Intersection of Two Arrays
- 350. Intersection of Two Arrays II
- 274. H-Index
- 275. H-Index II
- 244. Shortest Word Distance II
- 245. Shortest Word Distance III
- 217. Contains Duplicate
- 219. Contains Duplicate II
- 220. Contains Duplicate III
- 55. Jump Game
- 45. Jump Game II
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock II
- 123. Best Time to Buy and Sell Stock III
- 188. Best Time to Buy and Sell Stock IV
- 309. Best Time to Buy and Sell Stock with Cooldown
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 11. Container With Most Water
- 42. Trapping Rain Water
- 334. Increasing Triplet Subsequence
- 128. Longest Consecutive Sequence
- 287. Find the Duplicate Number
- 910. Smallest Range II
- 1674. Minimum Moves to Make Array Complementary
Interval
- 57. Insert Interval
- 1272. Remove Interval
- 1288. Remove Covered Intervals
- 56. Merge Intervals
- 452. Minimum Number of Arrows to Burst Balloons
- 252. Meeting Rooms
- 253. Meeting Rooms II
- 352. Data Stream as Disjoint Intervals
- 436. Find Right Interval
- 699. Falling Squares
- 659. Split Array into Consecutive Subsequences
- 846. Hand of Straights
Counter
- 1679. Max Number of K-Sum Pairs
- 1588. Sum of All Odd Length Subarrays
- 239. Sliding Window Maximum
- 1425. Constrained Subset Sum
- 215. Kth Largest Element in an Array
- 973. K Closest Points to Origin
- 1051. Height Checker
- 347. Top K Frequent Elements
- 1170. Compare Strings by Frequency of the Smallest Character
- 692. Top K Frequent Words
- 53. Maximum Subarray
- 918. Maximum Sum Circular Subarray
- 325. Maximum Size Subarray Sum Equals k
- 1477. Find Two Non-overlapping Sub-arrays Each With Target Sum
- 525. Contiguous Array
- 209. Minimum Size Subarray Sum
- 238. Product of Array Except Self
- 152. Maximum Product Subarray
- 228. Summary Ranges
- 163. Missing Ranges
- 1007. Minimum Domino Rotations For Equal Row
- 1363. Largest Multiple of Three
- 1395. Count Number of Teams
- 1409. Queries on a Permutation With Key
Sort
- 88. Merge Sorted Array
- 75. Sort Colors
- 283. Move Zeroes
- 1057. Campus Bikes
- 315. Count of Smaller Numbers After Self
- 376. Wiggle Subsequence
- 280. Wiggle Sort
- 324. Wiggle Sort II
Matrix
- 573. Squirrel Simulation
- 48. Rotate Image
- 54. Spiral Matrix
- 59. Spiral Matrix II
- 1706. Where Will the Ball Fall
- 1329. Sort the Matrix Diagonally
- 562. Longest Line of Consecutive One in Matrix
- 723. Candy Crush
- 311. Sparse Matrix Multiplication
- 1380. Lucky Numbers in a Matrix
- 835. Image Overlap
- 74. Search a 2D Matrix
- 240. Search a 2D Matrix II
- 79. Word Search
- 296. Best Meeting Point
- 361. Bomb Enemy
- 317. Shortest Distance from All Buildings
- 302. Smallest Rectangle Enclosing Black Pixels
- 36. Valid Sudoku
- 37. Sudoku Solver
- 1314. Matrix Block Sum
- 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold
- 1727. Largest Submatrix With Rearrangements
- 289. Game of Life
