An open API service indexing awesome lists of open source software.

https://github.com/emanuelschmoczer/leetcode-kotlin

Kotlin solutions for leetcode.com problems
https://github.com/emanuelschmoczer/leetcode-kotlin

kotlin leetcode leetcode-kotlin leetcode-solutions

Last synced: 4 months ago
JSON representation

Kotlin solutions for leetcode.com problems

Awesome Lists containing this project

README

          

# LeetCode in Kotlin

My solutions to LeetCode problems in Kotlin.

## Solutions

| # | Title | Difficulty |
|:------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------:|:----------:|
| [1](https://leetcode.com/problems/two-sum/description/) | [Two Sum](src/main/kotlin/com/schmoczer/leetcode/_0001/TwoSum.kt) | Easy |
| [5](https://leetcode.com/problems/longest-palindromic-substring/) | [Longest Palindromic Substring](src/main/kotlin/com/schmoczer/leetcode/_0005/LongestPalindromicSubstring.kt) | Medium |
| [8](https://leetcode.com/problems/string-to-integer-atoi/) | [String to Integer (atoi)](src/main/kotlin/com/schmoczer/leetcode/_0008/StringToInteger.kt) | Medium |
| [20](https://leetcode.com/problems/valid-parentheses/) | [Valid Parentheses](src/main/kotlin/com/schmoczer/leetcode/_0020/ValidParentheses.kt) | Easy |
| [27](https://leetcode.com/problems/remove-element/) | [Remove Element](src/main/kotlin/com/schmoczer/leetcode/_0027/README.md) | Easy |
| [26](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Remove Duplicates from Sorted Array](src/main/kotlin/com/schmoczer/leetcode/_0026/RemoveDuplicatesFromSortedArray.kt) | Easy |
| [42](https://leetcode.com/problems/trapping-rain-water/) | [Trapping Rain Water](src/main/kotlin/com/schmoczer/leetcode/_0042/TrappingRainWater.kt) | Hard |
| [48](https://leetcode.com/problems/rotate-image/) | [Rotate Image](src/main/kotlin/com/schmoczer/leetcode/_0048/RotateImage.kt) | Medium |
| [49](https://leetcode.com/problems/group-anagrams/) | [Group Anagrams](src/main/kotlin/com/schmoczer/leetcode/_0049/GroupAnagrams.kt) | Medium |
| [54](https://leetcode.com/problems/spiral-matrix/) | [Spiral Matrix](src/main/kotlin/com/schmoczer/leetcode/_0054/SpiralMatrix.kt) | Medium |
| [73](https://leetcode.com/problems/set-matrix-zeroes/) | [Set Matrix Zeroes](src/main/kotlin/com/schmoczer/leetcode/_0073/SetMatrixZeroes.kt) | Medium |
| [88](https://leetcode.com/problems/merge-sorted-array/) | [Merge Sorted Array](src/main/kotlin/com/schmoczer/leetcode/_0088/MergeSortedArray.kt) | Easy |
| [125](https://leetcode.com/problems/valid-palindrome/) | [Valid Palindrome](src/main/kotlin/com/schmoczer/leetcode/_0125/ValidPalindrome.kt) | Easy |
| [141](https://leetcode.com/problems/linked-list-cycle/) | [Linked List Cycle](src/main/kotlin/com/schmoczer/leetcode/_0141/LinkedListCycle.kt) | Easy |
| [151](https://leetcode.com/problems/reverse-words-in-a-string/) | [Reverse Words in a String](src/main/kotlin/com/schmoczer/leetcode/_0151/ReverseWordsInString.kt) | Medium |
| [186](https://leetcode.com/problems/reverse-words-in-a-string-ii/) | [Reverse Words in a String II](src/main/kotlin/com/schmoczer/leetcode/_0186/ReverseWordsInStringInPlace.kt) | Medium |
| [206](https://leetcode.com/problems/reverse-linked-list/) | [Reverse Linked List](src/main/kotlin/com/schmoczer/leetcode/_0206/ReverseLinkedList.kt) | Easy |
| [283](https://leetcode.com/problems/move-zeroes/) | [Move Zeroes](src/main/kotlin/com/schmoczer/leetcode/_0283/MoveZeroes.kt) | Easy |
| [344](https://leetcode.com/problems/reverse-string/) | [Reverse String](src/main/kotlin/com/schmoczer/leetcode/_0344/ReverseString.kt) | Easy |
| [383](https://leetcode.com/problems/ransom-note/) | [Ransom Note](src/main/kotlin/com/schmoczer/leetcode/_0383/RansomNote.kt) | Easy |
| [412](https://leetcode.com/problems/fizz-buzz/) | [Fizz Buzz](src/main/kotlin/com/schmoczer/leetcode/_0412/FizzBuzz.kt) | Easy |
| [485](https://leetcode.com/problems/max-consecutive-ones/) | [Max Consecutive Ones](src/main/kotlin/com/schmoczer/leetcode/_0485/MaxConsecutiveOnes.kt) | Easy |
| [773](https://leetcode.com/problems/sliding-puzzle/) | [Sliding Puzzle](src/main/kotlin/com/schmoczer/leetcode/_0773/SlidingPuzzle.kt) | Hard |
| [796](https://leetcode.com/problems/rotate-string/) | [Rotate String](src/main/kotlin/com/schmoczer/leetcode/_0796/RotateString.kt) | Easy |
| [876](https://leetcode.com/problems/middle-of-the-linked-list/) | [Middle of the Linked List](src/main/kotlin/com/schmoczer/leetcode/_0876/MiddleOfTheLinkedList.kt) | Easy |
| [905](https://leetcode.com/problems/sort-array-by-parity/) | [Sort Array By Parity](src/main/kotlin/com/schmoczer/leetcode/_0905/SortArrayByParity.kt) | Easy |
| [941](https://leetcode.com/problems/valid-mountain-array/) | [Valid Mountain Array](src/main/kotlin/com/schmoczer/leetcode/_0941/ValidMountainArray.kt) | Easy |
| [977](https://leetcode.com/problems/squares-of-a-sorted-array/) | [Squares of a Sorted Array](src/main/kotlin/com/schmoczer/leetcode/_0977/SquaresOfASortedArray.kt) | Easy |
| [1089](https://leetcode.com/problems/duplicate-zeros/) | [Duplicate Zeros](src/main/kotlin/com/schmoczer/leetcode/_1089/DuplicateZeros.kt) | Easy |
| [1295](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/) | [Find Numbers with Even Number of Digits](src/main/kotlin/com/schmoczer/leetcode/_1295/FindNumbersWithEvenNumberOfDigits.kt) | Easy |
| [1299](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/) | [Replace Elements with Greatest Element on Right Side](src/main/kotlin/com/schmoczer/leetcode/_1299/ReplaceElementsWithGreatestElementOnRightSide.kt) | Easy |
| [1342](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) | [Number of Steps to Reduce a Number to Zero](src/main/kotlin/com/schmoczer/leetcode/_1342/NumberOfStepsToReduceANumberToZero.kt) | Easy |
| [1346](https://leetcode.com/problems/check-if-n-and-its-double-exist/) | [Check If N and Its Double Exist](src/main/kotlin/com/schmoczer/leetcode/_1346/CheckIfNAndItsDoubleExist.kt) | Easy |
| [1480](https://leetcode.com/problems/running-sum-of-1d-array/) | [Running Sum of 1d Array](src/main/kotlin/com/schmoczer/leetcode/_1480/RunningSumOf1dArray.kt) | Easy |
| [1574](https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/) | [Shortest Subarray to be Removed to Make Array Sorted](src/main/kotlin/com/schmoczer/leetcode/_1574/ShortestSubarray.kt) | Medium |
| [1672](https://leetcode.com/problems/richest-customer-wealth/) | [Richest Customer Wealth](src/main/kotlin/com/schmoczer/leetcode/_1672/RichestCustomerWealth.kt) | Easy |
| [1829](https://leetcode.com/problems/maximum-xor-for-each-query/) | [Maximum XOR for Each Query](src/main/kotlin/com/schmoczer/leetcode/_1829/MaximumXorForEachQuery.kt) | Medium |
| [1861](https://leetcode.com/problems/rotating-the-box/) | [Rotating the Box](src/main/kotlin/com/schmoczer/leetcode/_1861/RotatingTheBox.kt) | Medium |
| [1957](https://leetcode.com/problems/delete-characters-to-make-fancy-string/) | [Delete Characters to Make Fancy String](src/main/kotlin/com/schmoczer/leetcode/_1957/DeleteCharactersToMakeFancyString.kt) | Easy |
| [1975](https://leetcode.com/problems/maximum-matrix-sum/) | [Maximum Matrix Sum](src/main/kotlin/com/schmoczer/leetcode/_1975/MaximumMatrixSum.kt) | Medium |
| [2064](https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store/) | [Minimized Maximum of Products Distributed to Any Store](src/main/kotlin/com/schmoczer/leetcode/_2064/MinimizedMaximum.kt) | Medium |
| [2070](https://leetcode.com/problems/most-beautiful-item-for-each-query/) | [Most Beautiful Item for Each Query](src/main/kotlin/com/schmoczer/leetcode/_2070/MostBeautifulItemForEachQuery.kt) | Medium |
| [2257](https://leetcode.com/problems/count-unguarded-cells-in-the-grid/) | [Count Unguarded Cells in the Grid](src/main/kotlin/com/schmoczer/leetcode/_2257/CountUnguardedCellsInTheGrid.kt) | Medium |
| [2275](https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero/) | [Largest Combination With Bitwise AND Greater Than Zero](src/main/kotlin/com/schmoczer/leetcode/_2275/LargestCombination.kt) | Medium |
| [2490](https://leetcode.com/problems/circular-sentence/) | [Circular Sentence](src/main/kotlin/com/schmoczer/leetcode/_2490/CircularSentence.kt) | Easy |
| [2516](https://leetcode.com/problems/take-k-of-each-character-from-left-and-right/) | [Take K of Each Character From Left and Right](src/main/kotlin/com/schmoczer/leetcode/_2516/TakeKOfEachCharacterFromLeftAndRight.kt) | Medium |
| [2577](https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid/) | [Minimum Time to Visit a Cell In a Grid](src/main/kotlin/com/schmoczer/leetcode/_2577/MinimumTimeToVisitCellInGrid.kt) | Hard |
| [2914](https://leetcode.com/problems/minimum-number-of-changes-to-make-binary-string-beautiful/) | [Minimum Number of Changes to Make Binary String Beautiful](src/main/kotlin/com/schmoczer/leetcode/_2914/MinChanges.kt) | Medium |
| [2924](https://leetcode.com/problems/find-champion-ii/) | [Find Champion II](src/main/kotlin/com/schmoczer/leetcode/_2924/FindChampionII.kt) | Medium |
| [3011](https://leetcode.com/problems/find-if-array-can-be-sorted/) | [Find if Array Can Be Sorted](src/main/kotlin/com/schmoczer/leetcode/_3011/FindIfArrayCanBeSorted.kt) | Medium |
| [3133](https://leetcode.com/problems/minimum-array-end/) | [Minimum Array End](src/main/kotlin/com/schmoczer/leetcode/_3133/MinimumArrayEnd.kt) | Medium |
| [3163](https://leetcode.com/problems/string-compression-iii/) | [String Compression III](src/main/kotlin/com/schmoczer/leetcode/_3163/StringCompression3.kt) | Medium |
| [3254](https://leetcode.com/problems/find-the-power-of-k-size-subarrays-i/) | [Find the Power of K-Size Subarrays I](src/main/kotlin/com/schmoczer/leetcode/_3254/FindThePowerOfKSizeSubarrays.kt) | Medium |