Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/it-enduro/code-tasks
Leetcode tasks in Kotlin
https://github.com/it-enduro/code-tasks
kotlin leetcode-solutions tests
Last synced: 18 days ago
JSON representation
Leetcode tasks in Kotlin
- Host: GitHub
- URL: https://github.com/it-enduro/code-tasks
- Owner: IT-Enduro
- Created: 2024-01-06T18:57:54.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-22T19:12:16.000Z (7 months ago)
- Last Synced: 2024-07-22T22:58:07.533Z (7 months ago)
- Topics: kotlin, leetcode-solutions, tests
- Language: Kotlin
- Homepage: https://leetcode.com
- Size: 174 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code Tasks
[![Build project](https://github.com/IT-Enduro/code-tasks/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/IT-Enduro/code-tasks/actions/workflows/build.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)## Easy level
1. [First bad version](https://leetcode.com/problems/first-bad-version/) – [solution](src/main/kotlin/ru/romanow/FirstBadVersion.kt), [test](src/test/kotlin/ru/romanow/FirstBadVersionTest.kt)
2. [Merge sorted array](https://leetcode.com/problems/merge-sorted-array/) – [solution](src/main/kotlin/ru/romanow/MergeSortedArrays.kt), [test](src/test/kotlin/ru/romanow/MergeSortedArraysTest.kt), разбор на [YouTube](https://youtube.com/watch?v=qEHYFV0f6FQ)
3. [Find the Index of the First Occurrence in a String](https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/) – [solution](src/main/kotlin/ru/romanow/FirstOccurrenceInAString.kt), [test](src/test/kotlin/ru/romanow/FirstOccurrenceInAStringTest.kt), **TODO**
4. [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) – [solution](src/main/kotlin/ru/romanow/LongestCommonPrefix.kt), [test](src/test/kotlin/ru/romanow/LongestCommonPrefixTest.kt)
5. [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) – [solution](src/main/kotlin/ru/romanow/ValidPalindrome.kt), [test](src/test/kotlin/ru/romanow/ValidPalindromeTest.kt), **TODO**
6. [Two Sum](https://leetcode.com/problems/two-sum/) – [solution](src/main/kotlin/ru/romanow/TwoSum.kt), [test](src/test/kotlin/ru/romanow/TwoSumTest.kt)
7. [Plus One](https://leetcode.com/problems/plus-one/) – [solution](src/main/kotlin/ru/romanow/PlusOne.kt), [test](src/test/kotlin/ru/romanow/PlusOneTest.kt), разбор на [YouTube](https://www.youtube.com/watch?v=tKVFK1kVzyI)
8. [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) – [solution](src/main/kotlin/ru/romanow/RomanToInteger.kt), [test](src/test/kotlin/ru/romanow/RomanToIntegerTest.kt)
9. [Remove Element](https://leetcode.com/problems/remove-element/) – [solution](src/main/kotlin/ru/romanow/RemoveElement.kt), [test](src/test/kotlin/ru/romanow/RemoveElementTest.kt), **TODO**
10. [Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) – [solution](src/main/kotlin/ru/romanow/MiddleOfTheLinkedList.kt), [test](src/test/kotlin/ru/romanow/MiddleOfTheLinkedListTest.kt), **TODO**
11. [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) – [solution](src/main/kotlin/ru/romanow/HammingWeight.kt), [test](src/test/kotlin/ru/romanow/HammingWeightTest.kt)
12. [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) – [solution](src/main/kotlin/ru/romanow/LinkedListCycle.kt), [test](src/test/kotlin/ru/romanow/LinkedListCycleTest.kt), **TODO**
13. [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) – [solution](src/main/kotlin/ru/romanow/ValidParentheses.kt), [test](src/test/kotlin/ru/romanow/ValidParenthesesTest.kt), **TODO**
14. [Missing Number](https://leetcode.com/problems/missing-number/) – [solution](src/main/kotlin/ru/romanow/MissingNumber.kt), [test](src/test/kotlin/ru/romanow/MissingNumberTest.kt)
15. [Power of Three](https://leetcode.com/problems/power-of-three/) – [solution](src/main/kotlin/ru/romanow/PowerOfThree.kt), [test](src/test/kotlin/ru/romanow/PowerOfThreeTest.kt)
16. [Majority Element](https://leetcode.com/problems/majority-element/) – [solution](src/main/kotlin/ru/romanow/MajorityElement.kt), [test](src/test/kotlin/ru/romanow/MajorityElementTest.kt)
17. [Valid Anagram](https://leetcode.com/problems/valid-anagram/) – [solution](src/main/kotlin/ru/romanow/ValidAnagram.kt), [test](src/test/kotlin/ru/romanow/ValidAnagramTest.kt)
18. [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) – [solution](src/main/kotlin/ru/romanow/IntersectionOfTwoArrays.kt), [test](src/test/kotlin/ru/romanow/IntersectionOfTwoArraysTest.kt)
19. [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) – [solution](src/main/kotlin/ru/romanow/RemoveDuplicatesFromSortedArray.kt), [test](src/test/kotlin/ru/romanow/RemoveDuplicatesFromSortedArrayTest.kt)## Medium level
1. [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) – [solution](src/main/kotlin/ru/romanow/ProductOfArrayExceptSelf.kt), [test](src/test/kotlin/ru/romanow/ProductOfArrayExceptSelfTest.kt)
2. [Integer to Roman](https://leetcode.com/problems/integer-to-roman/) – [solution](src/main/kotlin/ru/romanow/IntegerToRoman.kt), [test](src/test/kotlin/ru/romanow/IntegerToRomanTest.kt)
3. [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/) – [solution](src/main/kotlin/ru/romanow/SearchIn2dMatrix.kt), [test](src/test/kotlin/ru/romanow/SearchIn2dMatrixTest.kt), **TODO**
4. [Summary Ranges](https://leetcode.com/problems/summary-ranges/) – [solution](src/main/kotlin/ru/romanow/SummaryRanges.kt), [test](src/test/kotlin/ru/romanow/SummaryRangesTest.kt)
5. [Merge Intervals](https://leetcode.com/problems/merge-intervals/) – [solution](src/main/kotlin/ru/romanow/MergeIntervals.kt), [test](src/test/kotlin/ru/romanow/MergeIntervalsTest.kt)
6. [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/) – [solution](src/main/kotlin/ru/romanow/ValidSudoku.kt), [test](src/test/kotlin/ru/romanow/ValidSudokuTest.kt), **TODO**
7. [LRU Cache](https://leetcode.com/problems/lru-cache/) – [solution](src/main/kotlin/ru/romanow/LRUCache.kt), [test](src/test/kotlin/ru/romanow/LRUCacheTest.kt), **TODO**
8. [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) – [solution](src/main/kotlin/ru/romanow/MaximumSubarray.kt), [test](src/test/kotlin/ru/romanow/MaximumSubarrayTest.kt), **TODO**
9. [Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string/) – [solution](src/main/kotlin/ru/romanow/ReverseWordsInAString.kt), [test](src/test/kotlin/ru/romanow/ReverseWordsInAStringTest.kt), **TODO**
10. [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) – [solution](src/main/kotlin/ru/romanow/FlattenBinaryTreeToLinkedList.kt), [test](src/test/kotlin/ru/romanow/FlattenBinaryTreeToLinkedListTest.kt), **TODO**
11. [Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) – [solution](src/main/kotlin/ru/romanow/EvaluateReversePolishNotation.kt), [test](src/test/kotlin/ru/romanow/EvaluateReversePolishNotationTest.kt), **TODO**
12. [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) – [solution](src/main/kotlin/ru/romanow/LongestConsecutiveSequence.kt), [test](src/test/kotlin/ru/romanow/LongestConsecutiveSequenceTest.kt), **TODO**
13. [Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/) – [solution](src/main/kotlin/ru/romanow/BasicCalculator.kt), [test](src/test/kotlin/ru/romanow/BasicCalculatorTest.kt), **TODO**
14. [Basic Calculator II](https://leetcode.com/problems/implement-trie-prefix-tree/) – [solution](src/main/kotlin/ru/romanow/PrefixTree.kt), [test](src/test/kotlin/ru/romanow/PrefixTreeTest.kt)
15. [Game of Life](https://leetcode.com/problems/game-of-life/) – [solution](src/main/kotlin/ru/romanow/GameOfLife.kt), [test](src/test/kotlin/ru/romanow/GameOfLifeTest.kt)
16. [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) – [solution](src/main/kotlin/ru/romanow/DeleteNodeInALinkedList.kt), [test](src/test/kotlin/ru/romanow/DeleteNodeInALinkedListTest.kt)
17. [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/) – [solution](src/main/kotlin/ru/romanow/LongestCommonSubsequence.kt), [test](src/test/kotlin/ru/romanow/LongestCommonSubsequenceTest.kt)
18. [Delete Node in a Binary Search Tree](https://leetcode.com/problems/delete-node-in-a-bst/) – [solution](src/main/kotlin/ru/romanow/DeleteNodeInABalancedSearchTree.kt), [test](src/test/kotlin/ru/romanow/DeleteNodeInABalancedSearchTreeTest.kt)
19. [Decode String](https://leetcode.com/problems/decode-string/) – [solution](src/main/kotlin/ru/romanow/DecodeString.kt), [test](src/test/kotlin/ru/romanow/DecodeStringTest.kt)
20. [Determine if Two Strings Are Close](https://leetcode.com/problems/determine-if-two-strings-are-close/) – [solution](src/main/kotlin/ru/romanow/DetermineIfTwoStringsAreClose.kt), [test](src/test/kotlin/ru/romanow/DetermineIfTwoStringsAreCloseTest.kt)
21. [Removing Stars From a String](https://leetcode.com/problems/removing-stars-from-a-string/) – [solution](src/main/kotlin/ru/romanow/RemovingStarsFromAString.kt), [test](src/test/kotlin/ru/romanow/RemovingStarsFromAStringTest.kt)## Hard level
1. [Basic Calculator](https://leetcode.com/problems/basic-calculator/) – [solution](src/main/kotlin/ru/romanow/BasicCalculatorWithBrackets.kt), [test](src/test/kotlin/ru/romanow/BasicCalculatorWithBracketsTest.kt)