This repository includes a collection of common algorithms, data structures and solutions for LeetCode problems implemented in Kotlin language.
- Binary search tree
- Binary tree
- Disjoint set union
- Graph
- Heap
- Minimum spanning tree
- Parallel sorting
- Search
- Sorting
- 1. Two Sum
- 15. 3Sum
- 17. Letter Combinations of a Phone Number
- 20. Valid Parentheses
- 21. Merge Two Sorted Lists
- 23. Merge k Sorted Lists
- 34. Find First and Last Position of Element in Sorted Array
- 39. Combination Sum
- 40. Combination Sum II
- 46. Permutations
- 47. Permutations II
- 48. Rotate Image
- 49. Group Anagrams
- 50. Pow(x, n)
- 53. Maximum Subarray
- 54. Spiral Matrix
- 56. Merge Intervals
- 62. Unique Paths
- 70. Climbing Stairs
- 71. Simplify Path
- 73. Set Matrix Zeroes
- 74. Search a 2D Matrix
- 78. Subsets
- 79. Word Search
- 88. Merge Sorted Array
- 90. Subsets II
- 94. Binary Tree Inorder Traversal
- 112. Path Sum
- 121. Best Time to Buy and Sell Stock
- 125. Valid Palindrome
- 129. Sum Root to Leaf Numbers
- 131. Palindrome Partitioning
- 136. Single Number
- 139. Word Break
- 141. Linked List Cycle
- 152. Maximum Product Subarray
- 153. Find Minimum in Rotated Sorted Array
- 160. Intersection of Two Linked Lists
- 162. Find Peak Element
- 167. Two Sum II - Input Array Is Sorted
- 191. Number of 1 Bits
- 199. Binary Tree Right Side View
- 200. Number of Islands
- 207. Course Schedule
- 215. Kth Largest Element in an Array
- 226. Invert Binary Tree
- 227. Basic Calculator II
- 252. Meeting Rooms
- 253. Meeting Rooms II
- 269. Alien Dictionary
- 270. Closest Binary Search Tree Value
- 277. Find the Celebrity
- 283. Move Zeros
- 314. Binary Tree Vertical Order Traversal
- 320. Coin Change
- 332. Reconstruct Itinerary
- 339. Nested List Weight Sum
- 346. Moving Average from Data Stream
- 347. Top K Frequent Elements
- 350. Intersection of Two Arrays II
- 383. Ransom Note
- 408. Valid Word Abbreviation
- 426. Convert Binary Search Tree to Sorted Doubly Linked List
- 428. Serialize and Deserialize N-ary Tree
- 450. Delete Node in a BST
- 523. Continuous Subarray Sum
- 528. Random Pick with Weight
- 543. Diameter of Binary Tree
- 560. Subarray Sum Equals K
- 658. Find K Closest Elements
- 695. Max Area of Island
- 708. Insert into a Sorted Circular Linked List
- 791. Custom Sort String
- 827. Making A Large Island
- 875. Koko Eating Bananas
- 918. Maximum Sum Circular Subarray
- 919. Meeting Rooms II
- 921. Minimum Add to Make Parentheses Valid
- 938. Range Sum of BST
- 986. Interval List Intersections
- 1011. Capacity To Ship Packages Within D Days
- 1091. Shortest Path in Binary Matrix
- 1249. Minimum Remove to Make Valid Parentheses
- 1522. Diameter of N-Ary Tree
- 1539. Kth Missing Positive Number
- 1570. Dot Product of Two Sparse Vectors
- 1650. Lowest Common Ancestor of a Binary Tree III
- 1762. Buildings With an Ocean View
- 1861. Rotating the Box
- 1901. Find a Peak Element II
- 2401. Meeting Rooms III