Welcome to the LeetCode Solutions repository! This repository contains solutions to various LeetCode problems, implemented in Swift. It is designed to help you practice and improve your algorithm and problem-solving skills using the Swift programming language.
The repository is organized into different categories based on the type of problems:
-
Array Problems
- 75. Sort Colors
- 535. Encode and Decode TinyURL
- 554. Brick Wall
- 912. Sort an Array
- 122. Best Time to Buy and Sell Stock II
- 560. Subarray Sum Equals K
- 1930. Unique Length-3 Palindromic Subsequences
- 1963. Minimum Number of Swaps to Make the String Balanced
- 2001. Number of Pairs of Interchangeable Rectangles
- 2002. Maximum Product of the Length of Two Palindromic Subsequences
- 2017. Grid Game
- 438. Find All Anagrams in a String
- 280. Wiggle Sort
- 179. Largest Number
- 118. Pascal's Triangle
- 523. Continuous Subarray Sum
- 838. Push Dominoes
- 187. Repeated DNA Sequences
- 380. Insert Delete GetRandom O(1)
- 1461. Check If a String Contains All Binary Codes of Size K
- 304. Range Sum Query 2D - Immutable
- 665. Non-decreasing Array
- 2348. Number of Zero-Filled Subarrays
- 2405. Optimal Partition of String
- 1396. Design Underground System
- 2483. Minimum Penalty for a Shop
- 799. Champagne Tower
- 229. Majority Element II
- 1685. Sum of Absolute Differences in a Sorted Array
- 2610. Convert an Array Into a 2D Array With Conditions
- 2870. Minimum Number of Operations to Make Array Empty
- 2966. Divide Array Into Arrays With Max Difference
- 1291. Sequential Digits
- 451. Sort Characters By Frequency
-
Two Pointers
- 80. Remove Duplicates from Sorted Array II
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 18. 4Sum
- 189. Rotate Array
- 1968. Array With Elements Not Equal to Average of Neighbors
- 881. Boats to Save People
- 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
- 3. Longest Substring Without Repeating Characters
- 424. Longest Repeating Character Replacement
- 567. Permutation in String
- 76. Minimum Window Substring
- 239. Sliding Window Maximum
- 20. Valid Parentheses
-
Stack Problems
-
Graph Problems
-
Dynamic Programming Problems
-
Tree Problems
-
String Problems
-
Linked List Problems
-
Sorting and Searching Problems
-
Math Problems
-
Others