My goal is to provide access to my solutions and to have most of them in the perfect: Runtime: 0 ms, faster than 100.00% of Swift online submissions for Valid Parentheses.
- #1 Two Sum
- #2 Add Two Number
- #3 Longest Substring Without Repeating Characters
- #8 String to Integer (atoi)
- #12 Integer to Roman
- #13 Roman to Integer
- #15 Three Sum
- #20 Valid Parentheses
- #21 Merge Two Sorted Lists
- #23 Merge k Sorted Lists
- #24 Swap Nodes in Pairs
- #42 Trapping Rain Water
- #48 Rotate Image
- #49 Group Anagrams
- #53 Maximum Subarray
- #58 Length of Last Word
- #70 Climbing Stairs
- #78 Subsets
- #88 Merge Sorted Array
- #94 Binary Tree Inorder Traversal
- #98 Validate Binary Search Tree
- #101 Symmetric Tree
- #102 Binary Tree Level Order Traversal
- #103 Binary Tree Zigzag Level Order Traversal
- #104 Maximum Depth of Binary Tree
- #121 Best Time to Buy and Sell Stock
- #124 Binary Tree Maximum Path Sum
- #127 Word Ladder
- #138 Copy List with Random Pointer
- #139 Word Break
- #144 Binary Tree Preorder Traversal
- #145 Binary Tree Postorder Traversal
- #146 LRU Cache
- #155 Min Stack
- #160 Intersection of Two Linked Lists
- #167 Two Sum II - Input array is sorted
- #173 Binary Search Tree Iterator
- #189 Rotate Array
- #199 Binary Tree Right Side View
- #200 Number of Islands
- #203 Remove Linked List Elements
- #206 Reverse Linked List
- #207 Course Schedule
- #208 Implement Trie (Prefix Tree)
- #210 Course Schedule II
- #226 Invert Binary Tree
- #230 Kth Smallest Element in a BST
- #231 Power of Two
- #232 Implement Queue using Stacks
- #234 Palindrome Linked List
- #236 Lowest Common Ancestor of a Binary Tree
- #237 Delete Node in a Linked List
- #240 Search a 2D Matrix II
- #252 Meeting Rooms
- #253 Meeting Rooms II
- #270 Closest Binary Search Tree Value
- #286 Walls and Gates
- #293 Flip Game
- #297 Serialize and Deserialize Binary Tree
- #328 Odd Even Linked List
- #332 Reconstruct Itinerary
- #334 Reverse String
- #347 Top K Frequent Elements
- #348 Design Tic-Tac-Toe
- #349 Intersection of Two Arrays
- #367 Valid Perfect Square
- #380 Insert Delete GetRandom O(1)
- #392 Is Subsequence
- #402 Remove K Digits
- #403 Frog Jump
- #412 Fizz Buzz
- #438 Find All Anagrams in a String
- #443 String Compression
- #448 Find All Numbers Disappeared in an Array
- #451 Sort Characters By Frequencey
- #509 Fibonacci Number
- #540 Single Element in a Sorted Array
- #547 Friend Circles
- #567 Permutation in String
- #572 Subtree of Another Tree
- #637 Average of Levels in Binary Tree
- #653 Two Sum IV - Input is a BST
- #657 Robot Return to Origin
- #692 Top K Frequent Words
- #695 Max Area of Island
- #700 Search in a Binary Search Tree
- #706 Design HashMap
- #773 Flood Fill
- #811 Subdomain Visit Count
- #819 Most Common Word
- #844 BAckspace String Compare
- #918 Maximum Sum Circular Subarray
- #937 Reorder Data in Log Files
- #957 Prison Cells After N Days
- #966 Vowel Spellchecker
- #973 K Closest Points to Origin
- #993 Cousins in Binary Tree
- #994 Rotting Oranges
- #997 Find the Town Judge
- #1008 Construct Binary Search Tree from Preorder Traversal
- #1167 Minimum Cost to Connect Sticks
- #1232 Check If Is Is a Straight Line
- #1268 Search Suggestions System
- #1277 Count Square Submatrices with All Ones
- #1347 Minimum Number of Steps to Make Two Strings Anagram
- #1431 Kids With the Greatest Number of Candies
- #1441 Build an Array With Stack Operations
All challenges are copyright by https://leetcode.com/ and their respective authors.
I'm solely providing my solutions as well as questions and examples for context.