{"id":16465044,"url":"https://github.com/morfly/kotlin-algorithms","last_synced_at":"2025-10-27T12:31:48.534Z","repository":{"id":212868577,"uuid":"689171403","full_name":"Morfly/kotlin-algorithms","owner":"Morfly","description":"Collection of algorithms and data structures implemented in Kotlin","archived":false,"fork":false,"pushed_at":"2024-04-08T03:00:45.000Z","size":354,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T05:31:43.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Morfly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-09T01:46:28.000Z","updated_at":"2025-01-28T16:26:00.000Z","dependencies_parsed_at":"2024-01-03T22:28:09.649Z","dependency_job_id":"4751434a-5e7b-4d88-b034-485cf97336ae","html_url":"https://github.com/Morfly/kotlin-algorithms","commit_stats":null,"previous_names":["morfly/kotlin-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morfly%2Fkotlin-algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morfly%2Fkotlin-algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morfly%2Fkotlin-algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morfly%2Fkotlin-algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morfly","download_url":"https://codeload.github.com/Morfly/kotlin-algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238497493,"owners_count":19482264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T11:31:49.743Z","updated_at":"2025-10-27T12:31:48.527Z","avatar_url":"https://github.com/Morfly.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotlin Algorithms and Data Structures\nThis repository includes a collection of common algorithms, data structures and solutions for LeetCode problems implemented in Kotlin language.\n\n## Project structure\n\n### Foundation\n\n- [Binary search tree](src/foundation/binary-search-tree)\n- [Binary tree](src/foundation/binary-tree)\n    - [Breadth-first search](src/foundation/binary-tree/breadth-first-search)\n    - [Depth-first search](src/foundation/binary-tree/depth-first-search)\n    - [Morris traversal](src/foundation/binary-tree/morris-traversal)\n- [Disjoint set union](src/foundation/disjoint-set-union)\n- [Graph](src/foundation/graph)\n    - [Breadth-first search](src/foundation/graph/breadth-first-search)\n    - [Depth-first search](src/foundation/graph/depth-first-search)\n    - [Dijkstra's algorithm](src/foundation/graph/dijkstra)\n    - [Topological sort](src/foundation/graph/topological-sort)\n        - [Depth-first search](src/foundation/graph/topological-sort/dfs-topological-sort.kt)\n        - [Kahn's algorithm](src/foundation/graph/topological-sort/kahn-topological-sort.kt)\n- [Heap](src/foundation/heap/min-heap.kt)\n- [Minimum spanning tree](src/foundation/minimum-spanning-tree)\n    - [Kruskal's algorithm](src/foundation/minimum-spanning-tree/kruskal/kruskal-mst.kt)\n- [Parallel sorting](src/foundation/parallel-sorting)\n    - [Merge sort](src/foundation/parallel-sorting/parallel-merge-sort)\n    - [Quick sort](src/foundation/parallel-sorting/parallel-quick-sort)\n- [Search](src/foundation/search)\n    - [Linear search](src/foundation/search/linear)\n    - [Binary search](src/foundation/search/binary)\n- [Sorting](src/foundation/sorting)\n    - [Bubble sort](src/foundation/sorting/bubble-sort/bubble-sort.kt)\n    - [Selection sort](src/foundation/sorting/selection-sort/selection-sort.kt)\n    - [Insertion sort](src/foundation/sorting/insertion-sort/insertion-sort.kt)\n    - [Shell sort](src/foundation/sorting/shell-sort/shell-sort.kt)\n    - [Heap sort](src/foundation/sorting/heap-sort/heap-sort.kt)\n    - [Merge sort](src/foundation/sorting/merge-sort/merge-sort.kt)\n    - [Quick sort](src/foundation/sorting/quick-sort/quick-sort.kt)\n    - [Bucket sort](src/foundation/sorting/bucket-sort/bucket-sort.kt)\n    - [Counting sort](src/foundation/sorting/counting-sort/counting-sort.kt)\n    - [Radix sort](src/foundation/sorting/radix-sort/radix-sort.kt)\n\n### Exercises\n\n- [Dynamic programming](src/exercises/dynamic-programming)\n    - [Fibonacci sequence](src/exercises/dynamic-programming/fibonacci/fibonacci.kt)\n    - [Count paths](src/exercises/dynamic-programming/count-the-paths/recursive-solution.kt)\n\n### LeetCode\n\n- [1. Two Sum](src/leetcode/1-two-sum/solution.kt)\n- [15. 3Sum](src/leetcode/15-3sum/solution.kt)\n- [17. Letter Combinations of a Phone Number](src/leetcode/17-letter-combinations-of-a-phone-number/solution.kt)\n- [20. Valid Parentheses](src/leetcode/20-valid-parentheses/solution.kt)\n- [21. Merge Two Sorted Lists](src/leetcode/21-merge-two-sorted-lists/solution.kt)\n- [23. Merge k Sorted Lists](src/leetcode/23-merge-k-sorted-lists/solution-3.kt)\n- [34. Find First and Last Position of Element in Sorted Array](src/leetcode/34-find-first-and-last-position-of-element-in-sorted-array/solution.kt)\n- [39. Combination Sum](src/leetcode/39-combination-sum/solution.kt)\n- [40. Combination Sum II](src/leetcode/40-combination-sum-II/solution.kt)\n- [46. Permutations](src/leetcode/46-permutations/solution.kt)\n- [47. Permutations II](src/leetcode/47-permutations-II/solution.kt)\n- [48. Rotate Image](src/leetcode/48-rotate-image/solution.kt)\n- [49. Group Anagrams](src/leetcode/49-group-anagrams/solution.kt)\n- [50. Pow(x, n)](src/leetcode/50-pow-x-n/solution.kt)\n- [53. Maximum Subarray](src/leetcode/53-maximum-subarray/solution.kt)\n- [54. Spiral Matrix](src/leetcode/54-spiral-matrix/solution.kt)\n- [56. Merge Intervals](src/leetcode/56-merge-intervals/solution.kt)\n- [62. Unique Paths](src/leetcode/62-unique-paths/solution.kt)\n- [70. Climbing Stairs](src/leetcode/70-climbing-stairs/solution.kt)\n- [71. Simplify Path](src/leetcode/71-simplify-path/solution.kt)\n- [73. Set Matrix Zeroes](src/leetcode/73-set-matrix-zeroes/solution.kt)\n- [74. Search a 2D Matrix](src/leetcode/74-search-a-2d-matrix/solution.kt)\n- [78. Subsets](src/leetcode/78-subsets/solution.kt)\n- [79. Word Search](src/leetcode/79-word-search/solution.kt)\n- [88. Merge Sorted Array](src/leetcode/88-merge-sorted-array/solution.kt)\n- [90. Subsets II](src/leetcode/90-subsets-II/solution.kt)\n- [94. Binary Tree Inorder Traversal](src/leetcode/94-binary-tree-inorder-traversal/solution-1.kt)\n- [112. Path Sum](src/leetcode/112-path-sum/solution.kt)\n- [121. Best Time to Buy and Sell Stock](src/leetcode/121-best-time-to-buy-and-sell-stock/solution.kt)\n- [125. Valid Palindrome](src/leetcode/125-valid-palindrome/solution.kt)\n- [129. Sum Root to Leaf Numbers](src/leetcode/129-sum-root-to-leaf-numbers/solution.kt)\n- [131. Palindrome Partitioning](src/leetcode/131-palindrome-partitioning/solution.kt)\n- [136. Single Number](src/leetcode/136-single-number/solution.kt)\n- [139. Word Break](src/leetcode/139-word-break/solution.kt)\n- [141. Linked List Cycle](src/leetcode/141-linked-list-cycle/solution.kt)\n- [152. Maximum Product Subarray](src/leetcode/152-maximum-product-subarray/solution.kt)\n- [153. Find Minimum in Rotated Sorted Array](src/leetcode/153-find-minimum-in-rotated-sorted-array/solution.kt)\n- [160. Intersection of Two Linked Lists](src/leetcode/160-intersection-of-two-linked-lists/solution.kt)\n- [162. Find Peak Element](src/leetcode/162-find-peak-element/solution.kt)\n- [167. Two Sum II - Input Array Is Sorted](src/leetcode/167-two-sum-II-input-array-is-sorted/solution.kt)\n- [191. Number of 1 Bits](src/leetcode/191-number-of-1-bits/solution.kt)\n- [199. Binary Tree Right Side View](src/leetcode/199-binary-tree-right-side-view/solution.kt)\n- [200. Number of Islands](src/leetcode/200-number-of-islands/solution.kt)\n- [207. Course Schedule](src/leetcode/207-course-schedule/solution.kt)\n- [215. Kth Largest Element in an Array](src/leetcode/215-kth-largest-element-in-an-array/solution-2.kt)\n- [226. Invert Binary Tree](src/leetcode/226-invert-binary-tree/solution.kt)\n- [227. Basic Calculator II](src/leetcode/227-basic-calculator-II/solution.kt)\n- [252. Meeting Rooms](src/leetcode/252-meeting-rooms/solution.kt)\n- [253. Meeting Rooms II](src/leetcode/253-meeting-rooms-II/solution.kt)\n- [269. Alien Dictionary](src/leetcode/269-alien-dictionary/solution.kt)\n- [270. Closest Binary Search Tree Value](src/leetcode/270-closest-binary-search-tree-value/solution.kt)\n- [277. Find the Celebrity](src/leetcode/277-find-the-celebrity/solution.kt)\n- [283. Move Zeros](src/leetcode/283-move-zeros/solution.kt)\n- [314. Binary Tree Vertical Order Traversal](src/leetcode/314-binary-tree-vertical-order-traversal/solution.kt)\n- [320. Coin Change](src/leetcode/320-coin-change/solution.kt)\n- [332. Reconstruct Itinerary](src/leetcode/332-reconstruct-itinerary/solution.kt)\n- [339. Nested List Weight Sum](src/leetcode/339-nested-list-weight-sum/solution.kt)\n- [346. Moving Average from Data Stream](src/leetcode/346-moving-average-from-data-stream/solution.kt)\n- [347. Top K Frequent Elements](src/leetcode/347-top-k-frequent-elements/solution-2.kt)\n- [350. Intersection of Two Arrays II](src/leetcode/350-intercection-of-two-arrays-II/solution.kt)\n- [383. Ransom Note](src/leetcode/383-ransom-note/solution-2.kt)\n- [408. Valid Word Abbreviation](src/leetcode/408-valid-word-abbreviation/solution.kt)\n- [426. Convert Binary Search Tree to Sorted Doubly Linked List](src/leetcode/426-convert-binary-search-tree-to-sorted-doubly-linked-list/solution.kt)\n- [428. Serialize and Deserialize N-ary Tree](src/leetcode/428-serialize-and-deserialize-n-ary-tree/solution.kt)\n- [450. Delete Node in a BST](src/leetcode/450-delete-node-in-a-bst/solution.kt)\n- [523. Continuous Subarray Sum](src/leetcode/523-continuous-subarray-sum/solution.kt)\n- [528. Random Pick with Weight](src/leetcode/528-random-pick-with-weight/solution.kt)\n- [543. Diameter of Binary Tree](src/leetcode/543-diameter-of-binary-tree/solution.kt)\n- [560. Subarray Sum Equals K](src/leetcode/560-subarray-sum-equals-k/solution.kt)\n- [658. Find K Closest Elements](src/leetcode/658-find-k-closest-elements/solution-1.kt)\n- [695. Max Area of Island](src/leetcode/695-max-area-of-islands/solution.kt)\n- [708. Insert into a Sorted Circular Linked List](src/leetcode/708-insert-into-a-sorted-circular-linked-list/solution.kt)\n- [791. Custom Sort String](src/leetcode/791-custom-sort-string/solution-2.kt)\n- [827. Making A Large Island](src/leetcode/827-making-a-large-island/solution.kt)\n- [875. Koko Eating Bananas](src/leetcode/875-koko-eating-bananas/solution.kt)\n- [918. Maximum Sum Circular Subarray](src/leetcode/918-maximum-sum-circular-subarray/solution.kt)\n- [919. Meeting Rooms II](src/leetcode/919-meeting-rooms-II/solution.kt)\n- [921. Minimum Add to Make Parentheses Valid](src/leetcode/921-minimum-add-to-make-parentheses-valid/solution.kt)\n- [938. Range Sum of BST](src/leetcode/938-range-sum-of-bst/solution.kt)\n- [986. Interval List Intersections](src/leetcode/986-interval-list-intersections/solution.kt)\n- [1011. Capacity To Ship Packages Within D Days](src/leetcode/1011-capacity-to-ship-packages-within-d-days/solution.kt)\n- [1091. Shortest Path in Binary Matrix](src/leetcode/1091-shortest-path-in-binary-matrix/solution.kt)\n- [1249. Minimum Remove to Make Valid Parentheses](src/leetcode/1249-minimum-remove-to-make-valid-parentheses/solution.kt)\n- [1522. Diameter of N-Ary Tree](src/leetcode/1522-diameter-of-n-ary-tree/solution.kt)\n- [1539. Kth Missing Positive Number](src/leetcode/1539-kth-missing-positive-number/solution.kt)\n- [1570. Dot Product of Two Sparse Vectors](src/leetcode/1570-dot-product-of-two-sparce-arrays/solution.kt)\n- [1650. Lowest Common Ancestor of a Binary Tree III](src/leetcode/1650-lowest-common-ancestor-of-a-binary-tree-III/solution-2.kt)\n- [1762. Buildings With an Ocean View](src/leetcode/1762-buildings-with-an-ocean-view/solution.kt)\n- [1861. Rotating the Box](src/leetcode/1861-rotating-the-box/solution.kt)\n- [1901. Find a Peak Element II](src/leetcode/1901-find-a-peak-element-II/solution.kt)\n- [2401. Meeting Rooms III](src/leetcode/2402-meeting-rooms-III/solution.kt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorfly%2Fkotlin-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorfly%2Fkotlin-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorfly%2Fkotlin-algorithms/lists"}