Skip to content

tariq-hasan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures

Coding Patterns

Arrays

Two Pointers

K-Sum Problems

  1. Easy: 1. Two Sum
  2. Medium: 167. Two Sum II - Input Array Is Sorted
  3. Medium: 15. 3Sum
  4. Medium: 16. 3Sum Closest
  5. Medium: 259. 3Sum Smaller
  6. Medium: 1679. Max Number of K-Sum Pairs
  7. Medium: 532. K-diff Pairs in an Array

Palindrome Problems

  1. Easy: 9. Palindrome Number
  2. Easy: 125. Valid Palindrome
  3. Easy: 680. Valid Palindrome II

Miscellaneous Problems

  1. Easy: 283. Move Zeroes
  2. Easy: 392. Is Subsequence
  3. Easy: 977. Squares of a Sorted Array
  4. Medium: 11. Container with Most Water
  5. Medium: 75. Sort Colors
  6. Medium: 151. Reverse Words in a String
  7. Medium: 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit

Fast and Slow Pointers

  1. Easy: 141. Linked List Cycle
  2. Easy: 202. Happy Number
  3. Easy: 234. Palindrome Linked List
  4. Medium: 457. Circular Array Loop
  5. Easy: 876. Middle of the Linked List

Sliding Window

  1. Easy: 121. Best Time to Buy and Sell Stock
  2. Easy: 643. Maximum Average Subarray I
  3. Medium: 3. Longest Substring Without Repeating Characters
  4. Medium: 187. Repeated DNA Sequences
  5. Medium: 209. Minimum Size Subarray Sum
  6. Medium: 340. Longest Substring with At Most K Distinct Characters
  7. Medium: 395. Longest Substring with At Least K Repeating Characters
  8. Medium: 487. Max Consecutive Ones II
  9. Medium: 904. Fruit into Baskets
  10. Medium: 1004. Max Consecutive Ones III
  11. Medium: 1248. Count Number of Nice Subarrays
  12. Medium: 1456. Maximum Number of Vowels in a Substring of Given Length
  13. Medium: 1493. Longest Subarray of 1’s After Deleting One Element
  14. Hard: 30. Substring with Concatenation of All Words
  15. Hard: 76. Minimum Window Substring
  16. Hard: 239. Sliding Window Maximum
  17. Hard: 727. Minimum Window Subsequence

Merge Intervals

  1. Easy: 228. Summary Ranges
  2. Easy: 252. Meeting Rooms
  3. Easy: 2446. Determine if Two Events Have Conflict
  4. Medium: 56. Merge Intervals (Amberflo)
  5. Medium: 57. Insert Interval
  6. Medium: 253. Meeting Rooms II
  7. Medium: 435. Non-overlapping Intervals (Amberflo.io)
  8. Medium: 452. Minimum Number of Arrows to Burst Balloons
  9. Medium: 986. Interval List Intersections (H2O.ai)
  10. Medium: 1094. Car Pooling
  11. Medium: 2406. Divide Intervals Into Minimum Number of Groups
  12. Medium: 2410. Maximum Matching of Players with Trainers
  13. Medium: 2462. Total Cost to Hire K Workers
  14. Hard: 759. Employee Free Time
  15. Hard: 2158. Amount of New Area Painted Each Day
  16. Hard: 2213. Longest Substring of One Repeating Character
  17. Hard: 2251. Number of Flowers in Full Bloom
  18. Hard: 2276. Count Integers in Intervals
  19. Hard: 2402. Meeting Rooms III

K-way Merge

  1. Easy: 88. Merge Sorted Array
  2. Medium: 373. Find K Pairs with Smallest Sums
  3. Medium: 378. Kth Smallest Element in a Sorted Matrix
  4. Hard: 4. Median of Two Sorted Arrays
  5. Hard: 23. Merge k Sorted Lists

Miscellaneous

  1. Easy: 1351. Count Negative Numbers in a Sorted Matrix

Backtracking

  1. Medium: 46. Permutations
  2. Medium: 47. Permutations II
  3. Medium: 31. Next Permutation
  4. Medium: 78. Subsets
  5. Medium: 90. Subsets II
  6. Medium: 39. Combination Sum
  7. Medium: 40. Combination Sum II
  8. Medium: 216. Combination Sum III
  9. Medium: 131. Palindrome Partitioning
  10. Hard: 132. Palindrome Partitioning II
  11. Hard: 51. N-Queens
  12. Hard: 52. N-Queens II
  13. Medium: 17. Letter Combinations of a Phone Number
  14. Medium: 22. Generate Parentheses
  15. Medium: 77. Combinations
  16. Medium: 79. Word Search
  17. Medium: 93. Restore IP Addresses
  18. Medium: 241. Different Ways to Add Parentheses
  19. Medium: 320. Generalized Abbreviation
  20. Medium: 473. Matchsticks to Square
  21. Medium: 490. The Maze
  22. Medium: 494. Target Sum
  23. Medium: 526. Beautiful Arrangement
  24. Medium: 638. Shopping Offers
  25. Medium: 784. Letter Case Permutation
  26. Medium: 797. All Paths From Source to Target
  27. Medium: 1219. Path with Maximum Gold
  28. Hard: 37. Sudoku Solver
  29. Hard: 282. Expression Add Operators
  30. Hard: 301. Remove Invalid Parentheses
  31. Hard: 425. Word Squares
  32. Hard: 489. Robot Room Cleaner

Custom Data Structures

  1. Easy: 359. Logger Rate Limiter

Bit Manipulation

  1. Easy: 136. Single Number
  2. Easy: 190. Reverse Bits
  3. Easy: 191. Number of 1 Bits
  4. Easy: 231. Power of Two
  5. Easy: 268. Missing Number
  6. Easy: 338. Counting Bits
  7. Easy: 389. Find the Difference
  8. Easy: 461. Hamming Distance
  9. Easy: 476. Number Complement
  10. Easy: 832. Flipping an Image
  11. Medium: 137. Single Number II
  12. Medium: 201. Bitwise AND of Numbers Range
  13. Medium: 371. Sum of Two Integers
  14. Medium: 477. Total Hamming Distance
  15. Medium: 1318. Minimum Flips to Make a OR b Equal to c

Modified Binary Search

Search in Array

  1. Easy: 35. Search Insert Position
  2. Easy: 744. Find Smallest Letter Greater Than Target
  3. Medium: 34. Find First and Last Position of Element in Sorted Array

Standard Search

  1. Easy: 278. First Bad Version
  2. Easy: 374. Guess Number Higher or Lower
  3. Medium: 74. Search a 2D Matrix
  4. Medium: 702. Search in a Sorted Array of Unknown Size

Math

  1. Easy: 69. Sqrt(x)
  2. Easy: 367. Valid Perfect Square
  3. Easy: 441. Arranging Coins

Tricky Invariant

  1. Medium: 275. H-Index II
  2. Medium: 540. Single Element in a Sorted Array
  3. Medium: 658. Find K Closest Elements
  4. Medium: 852. Peak Index in a Mountain Array

As a Tool

  1. Easy: 1099. Two Sum Less Than K
  2. Medium: 300. Longest Increasing Subsequence
  3. Medium: 1498. Number of Subsequences That Satisfy the Given Sum Condition

On Solution Space

  1. Medium: 875. Koko Eating Bananas
  2. Medium: 1011. Capacity To Ship Packages Within D Days
  3. Medium: 1283. Find the Smallest Divisor Given a Threshold

Greedy Techniques

  1. Easy: 455. Assign Cookies
  2. Easy: 1710. Maximum Units on a Truck

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages