Data Structures and Algorithms in Swift
Note: Most of problems have been picked from leetcode.
- Swift 5.0
- Diameter of Binary Tree
- Invert Binary Tree
- Kth Smallest Element in a BST
- LCA of a Binary Tree
- Level Order Traversal
- Maximum Depth of Binary Tree
- Maximum Path Sum
- MinimunDepth
- Shortest distance between two nodes in BST
- Validate Binary Search Tree
- VerticalOrderTraversal
- Sum Tree
- Binary Tree Paths
- Recover Binary Search Tree
- LCA of a BST
- Unique Binary Search Trees
- Convert Sorted Array to Binary Search Tree
- Construct Binary Tree from Preorder and Inorder Traversal
- Boundary Traversal Of Binary Tree
- Binary Search
- Jump Game
- Kth Largest Element
- Subarray Sum Equals K
- Subsets
- Minimum Window Substring
- Sort Colors
- Frequencies of array elements in range 1 to n
- Delete Products
- K-diff Pairs in an Array
- Maximum Product Sum Among All Rotations
- Minimum Swaps To Sort An Array
- Two Sum
- Longest Common Prefix
- Group Anagrams
- Maximum Subarray
- Longest Consecutive Sequence
- Merge Intervals
- Find Peak Element
- SmallestPositiveInteger
- Gas Station
- 3Sum Smaller
- Minimum Remove to Make Valid Parentheses
- Search in Rotated Sorted Array
- Minimum Subarray With Required Sum
- Longest Substring Of All Vowels in Order
- Partition Equal Subset Sum
- Maximum Sum Subsequence NonAdjacent
- Coin Change
- Climbing Stairs
- Best Time to Buy and Sell Stock
- House Robber
- Edit Distance
- Longest Increasing Subsequence
- Longest Common Subsequence