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

https://github.com/mu7annad0/leetcode

My answer for leetcode problems
https://github.com/mu7annad0/leetcode

leetcode leetcode-python leetcode-solutions python

Last synced: 7 months ago
JSON representation

My answer for leetcode problems

Awesome Lists containing this project

README

          

| # | Problem | Solution | Difficulty |
|:----:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------:|
| 1 | [Two Sum](https://leetcode.com/problems/two-sum) | [python](https://github.com/Mu7annad0/leetcode/blob/ee2d1755d8b12550a97c4fb70bd4e5b4f936688c/leetcode/0001.TwoSum) | Easy |
| 26 | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array) | [python](https://github.com/Mu7annad0/leetcode/blob/2ffc40ecf4e48e85457fe8dcb1e7ff48ca3df659/leetcode/0026.RemoveDuplicatesFromSortedArray) | Easy |
| 27 | [Remove Element](https://leetcode.com/problems/remove-element) | [python](https://github.com/Mu7annad0/leetcode/blob/e315a959042e201b6d16571624ca04dc5f748e15/leetcode/0027.RemoveElement) | Easy |
| 28 | [Find the Index of the First Occurrence in a String](https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string) | [python](https://github.com/Mu7annad0/leetcode/blob/b611f9fbbbd03c9d86cf2675c1eb76c3124b65bb/leetcode/0028.FindTheIndexOfTheFirstOccurrenceInAString) | Easy |
| 55 | [Jump Game](https://leetcode.com/problems/jump-game) | [python](https://github.com/Mu7annad0/leetcode/blob/7ceb38ccfd62f467ac3b088a6be7619945c90367/leetcode/0055.JumpGame) | Medium |
| 80 | [Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii) | [python](https://github.com/Mu7annad0/leetcode/blob/2d1a54268448694367017c92c70bca0124848e1a/leetcode/0080.RemoveDuplicatesFromSortedArrayII) | Medium |
| 88 | [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array) | [python](https://github.com/Mu7annad0/leetcode/blob/995ef9bba4b7ebc5fc6ba1163c2de5e530ce3fe1/leetcode/0088.MergeSortedArray) | Easy |
| 91 | [Decode Ways](https://leetcode.com/problems/decode-ways) | [python](https://github.com/Mu7annad0/leetcode/blob/a58cbeb3702d20cde829b336ea087a9662e59473/leetcode/0091.DecodeWays) | Medium |
| 94 | [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal) | [python](https://github.com/Mu7annad0/leetcode/blob/9fce08914a5f3267bdfe02167a965c7504026580/leetcode/0094.BinaryTreeInorderTraversal) | Easy |
| 121 | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock) | [python](https://github.com/Mu7annad0/leetcode/blob/e11360a7479e4b0a2651bd52480cbbd1d38391b9/leetcode/0121.BestTimeToBuyAndSellStock) | Easy |
| 122 | [Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii) | [python](https://github.com/Mu7annad0/leetcode/blob/2522ca83c46f973ca842d55917e859da21690372/leetcode/0122.BestTImeToBuyAndSellStockII) | Medium |
| 151 | [Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string) | [python](https://github.com/Mu7annad0/leetcode/blob/471db575e14cfc9ba359b52665ef5bcb187332c4/leetcode/0151.ReverseWords) | Medium |
| 165 | [Compare Version Numbers](https://leetcode.com/problems/compare-version-numbers) | [python](https://github.com/Mu7annad0/leetcode/blob/87b5f240846801f021789c269ecf9361eae142f0/leetcode/0165.CompareVersionNumbers) | Medium |
| 169 | [Majority Element](https://leetcode.com/problems/majority-element) | [python](https://github.com/Mu7annad0/leetcode/blob/8b11a616f2e0555456db082d8db11b0ab650464e/leetcode/0169.MajorityElement) | Easy |
| 189 | [Rotate Array](https://leetcode.com/problems/Rotate-Array) | [python](https://github.com/Mu7annad0/leetcode/blob/6624accb96f1d4267ad8be83f0ef5cdc2f13b32f/leetcode/0189.RotateArray) | Medium |
| 237 | [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list) | [python](https://github.com/Mu7annad0/leetcode/blob/de49447ba609f5cc9d81eda0b2c1391ef935af6d/leetcode/0237.DeleteNodeInALinkedList) | Medium |
| 242 | [Valid Anagram](https://leetcode.com/problems/valid-anagram) | [python](https://github.com/Mu7annad0/leetcode/blob/e1d3ce09b80585a70c9459708e114f5b26e0aa2d/leetcode/0242.ValidAnagram) | Easy |
| 300 | [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence) | [python](https://github.com/Mu7annad0/leetcode/blob/0e6d813b4aff4ce68111ebc2ff4962e7bab9e8a1/leetcode/0300.LongestIncreasingSubsequence) | Medium |
| 389 | [Find the Difference](https://leetcode.com/problems/find-the-difference) | [python](https://github.com/Mu7annad0/leetcode/blob/aac1b06b0bdb2308eb6ec23516b60173c638b161/leetcode/0389.FindTheDifference) | Easy |
| 455 | [Assign Cookies](https://leetcode.com/problems/assign-cookies) | [python](https://github.com/Mu7annad0/leetcode/blob/1ffedc2aa5195efba055e9175ea9bdf7459069c2/leetcode/0455.AssignCookies) | Easy |
| 506 | [Relative Ranks](https://leetcode.com/problems/Relative-Ranks) | [python](https://github.com/Mu7annad0/leetcode/blob/66a5a8c71a6b807bb4a64b4d9d758cf16ad96679/leetcode/0506.RelativeRanks) | Easy |
| 605 | [Can Place Flowers](https://leetcode.com/problems/can-place-flowers) | [python](https://github.com/Mu7annad0/leetcode/blob/471db575e14cfc9ba359b52665ef5bcb187332c4/leetcode/0605.CanPlaceFlowers) | Easy |
| 606 | [Construct String from Binary Tree](https://leetcode.com/problems/construct-string-from-binary-tree) | [python](https://github.com/Mu7annad0/leetcode/blob/d535f0a3a7a569b5bb944616acc773dd3e71fdb4/leetcode/0606.ConstructStringFromBinaryTree) | Easy |
| 867 | [Transpose Matrix](https://leetcode.com/problems/transpose-matrix) | [python](https://github.com/Mu7annad0/leetcode/blob/28c2722fb8202a78f3aeca7c936ec5b5f65fbecb/leetcode/0867.TransposeMatrix) | Easy |
| 881 | [Boats to Save People](https://leetcode.com/problems/boats-to-save-people) | [python](https://github.com/Mu7annad0/leetcode/blob/e336f0c2f403ae46fea79361bd075d56ac314380/leetcode/0881.BoatsToSavePeople) | Medium |
| 1155 | [Number of Dice Rolls With Target Sum](https://leetcode.com/problems/number-of-dice-rolls-with-target-sum) | [python](https://github.com/Mu7annad0/leetcode/blob/bf9b5fd25bfcf759f0cf88f559dc9702a8d1250e/leetcode/1155.NumberOfDiceRollsWithTargetSum) | Medium |
| 1160 | [Find Words That Can Be Formed by Characters](https://leetcode.com/problems/find-words-that-can-be-formed-by-characters) | [python](https://github.com/Mu7annad0/leetcode/blob/1041df9cdfe6577ac5ddffc7d478ab16f44313ce/leetcode/1160.FindWordsThatCanBeFormedByCharacters) | Easy |
| 1207 | [Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences) | [python](https://github.com/Mu7annad0/leetcode/blob/82a24daff27a2d921c28e1b00f404d503d4d6137/leetcode/1207.UniqueNumberOfOccurrences) | Easy |
| 1266 | [Minimum Time Visiting All Points](https://leetcode.com/problems/minimum-time-visiting-all-points) | [python](https://github.com/Mu7annad0/leetcode/blob/0448a287233fa39c24bf2fdab3e2e90dda6b346b/leetcode/1266.MinimumTimeVisitingAllPoints) | Easy |
| 1287 | [Element Appearing More Than 25% In Sorted Array](https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array) | [python](https://github.com/Mu7annad0/leetcode/blob/7fca49e0693222847c8e1db472329c08cee86c01/leetcode/1287.ElementAppearingMoreThan25%25InSortedArray) | Easy |
| 1335 | [Minimum Difficulty of a Job Schedule](https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule) | [python](https://github.com/Mu7annad0/leetcode/blob/78d95b6ae8ad0117885a1367a0c2dce6969e227f/leetcode/1335.MinimumDifficultyOfA%20JobSchedule) | Hard |
| 1422 | [Maximum Score After Splitting a String](https://leetcode.com/problems/maximum-score-after-splitting-a-string) | [python](https://github.com/Mu7annad0/leetcode/blob/main/leetcode/1422.MaximumScoreAfterSplittingAString/MaximumScoreAfterSplittingA%20String.py) | Easy |
| 1431 | [Kids With the Greatest Number of Candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies) | [python](https://github.com/Mu7annad0/leetcode/blob/9478c5bf08da85575d2e20098d10bc5c06641c92/leetcode/1431.KidsWithTheGreatestNumberOfCandies) | Easy |
| 1436 | [Destination City](https://leetcode.com/problems/destination-city) | [python](https://github.com/Mu7annad0/leetcode/blob/1b690aee1330e369ecf874406b624c000314dff9/leetcode/1436.DestinationCity) | Easy |
| 1464 | [Maximum Product of Two Elements in an Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array) | [python](https://github.com/Mu7annad0/leetcode/blob/95c2835a6e09adb9f677f2438849e95fb3a6189a/leetcode/1464.MaximumProductOfTwoElementsInAnArray) | Easy |
| 1496 | [Path Crossing](https://leetcode.com/problems/path-crossing) | [python](https://github.com/Mu7annad0/leetcode/blob/1900e928e5d8e7da64789e54f5feb10ed47d921a/leetcode/1496.PathCrossing) | Easy |
| 1497 | [Check If Array Pairs Are Divisible by k](https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k/description/) | [python](https://github.com/Mu7annad0/leetcode/blob/15c528a7a1024b7611442bcd8a1037a09c139ca9/leetcode/1497.CheckIfArrayPairsAreDivisibleByK) | Medium |
| 1531 | [String Compression II](https://leetcode.com/problems/string-compression-ii) | [python](https://github.com/Mu7annad0/leetcode/blob/b1ce6e228b0fad9153b043317a46d562312ee506/leetcode/1531.StringCompression-II) | Hard |
| 1578 | [Minimum Time to Make Rope Colorful](https://leetcode.com/problems/minimum-time-to-make-rope-colorful) | [python](https://github.com/Mu7annad0/leetcode/blob/58829acfd7f6cc85601f0b305d34e29930069957/leetcode/1578.MinimumTimeToMakeRopeColorful) | Medium |
| 1582 | [Special Positions in a Binary Matrix](https://leetcode.com/problems/special-positions-in-a-binary-matrix) | [python](https://github.com/Mu7annad0/leetcode/blob/c8aba535b0249ba4f505738623992ff5aa0776a4/leetcode/1582.SpecialPositionsInABinaryMatrix) | Easy |
| 1624 | [Largest Substring Between Two Equal Characters](https://leetcode.com/problems/largest-substring-between-two-equal-characters) | [python](https://github.com/Mu7annad0/leetcode/blob/2efffe123398008c045b9959df2e2ba2ee8ca75d/leetcode/1624.LargestSubstringBetweenTwoEqualCharacters) | Easy |
| 1637 | [Widest Vertical Area Between Two Points Containing No Points](https://leetcode.com/problems/widest-vertical-area-between-two-points-containing-no-points/description/) | [python](https://leetcode.com/problems/widest-vertical-area-between-two-points-containing-no-points) | Medium |
| 1662 | [Check If Two String Arrays are Equivalent](https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent) | [python](https://github.com/Mu7annad0/leetcode/blob/19398f6f994bcfde588a93a0d7a61abaaddc9fe8/leetcode/1662.CheckIfTwoStringArraysAreEquivalent) | Easy |
| 1688 | [Count of Matches in Tournament](https://leetcode.com/problems/count-of-matches-in-tournament) | [python](https://github.com/Mu7annad0/leetcode/blob/33244a525b83fb4b191ed47552bfd957c527445b/leetcode/1688.CountOfMatchesInTournament) | Easy |
| 1716 | [Calculate Money in Leetcode Bank](https://leetcode.com/problems/calculate-money-in-leetcode-bank) | [python](https://github.com/Mu7annad0/leetcode/blob/64dc002ef3991b8a6b77b086d12c2da37379d9c2/leetcode/1716.CalculateMoneyInLeetcodeBank) | Easy |
| 1758 | [Minimum Changes To Make Alternating Binary String](https://leetcode.com/problems/minimum-changes-to-make-alternating-binary-string) | [python](https://github.com/Mu7annad0/leetcode/blob/323657a53828deac82686679e62dfa49fa7d4c03/leetcode/1758.MinimumChangesToMakeAlternatingBinaryString) | Easy |
| 1768 | [Merge Strings Alternately](https://leetcode.com/problems/merge-strings-alternately) | [python](https://github.com/Mu7annad0/leetcode/blob/9478c5bf08da85575d2e20098d10bc5c06641c92/leetcode/1768.MergeStringsAlternately) | Easy |
| 1897 | [Redistribute Characters to Make All Strings Equal](https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal) | [python](https://github.com/Mu7annad0/leetcode/blob/3e9450c5deddbc4d67bfe2f9b707ba30174897ff/leetcode/1897.RedistributeCharactersToMakeAllStringsEqual) | Easy |
| 1903 | [Largest Odd Number in String](https://leetcode.com/problems/largest-odd-number-in-string) | [python](https://github.com/Mu7annad0/leetcode/blob/5edc6f1b5221fa8079c6b8bb8fbc926067c1d68a/leetcode/1903.LargestOddNumberInString) | Easy |
| 2125 | [Number of Laser Beams in a Bank](https://leetcode.com/problems/number-of-laser-beams-in-a-bank) | [python](https://github.com/Mu7annad0/leetcode/blob/324e8bb9d5bb5294c9fe8b7c9748d93e6bc7f73c/leetcode/2125.NumberOfLaserBeamsInABank) | Medium |
| 2264 | [Largest 3-Same-Digit Number in String](https://leetcode.com/problems/largest-3-same-digit-number-in-string) | [python](https://github.com/Mu7annad0/leetcode/blob/a1bffdfe105d7c868375684e1611b8898c8329d4/leetcode/2264.Largest3-Same-DigitNumberInString) | Easy |
| 2441 | [ Largest Positive Integer That Exists With Its Negative](https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative) | [python](https://github.com/Mu7annad0/leetcode/blob/d5514b5dbc51a5f154c7d5800f21f1eb6474d52e/leetcode/2441.LargestPositiveIntegerThatExistsWithItsNegative) | Easy |
| 2482 | [Difference Between Ones and Zeros in Row and Column](https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column) | [python](https://github.com/Mu7annad0/leetcode/blob/9ea283455dcce3393fcd8573306e4ea7d837d149/leetcode/2482.DifferenceBetweenOnesAndZerosInRowAndColumn) | Medium |
| 2487 | [Remove Nodes From Linked List](https://leetcode.com/problems/remove-nodes-from-linked-list) | [python](https://github.com/Mu7annad0/leetcode/blob/7906020e9d3a1a8383c44d3dcdff59799524245e/leetcode/2487.RemoveNodesFromLinkedList) | Medium |
| 2610 | [Convert an Array Into a 2D Array With Conditions](https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions) | [python](https://github.com/Mu7annad0/leetcode/blob/1d13ac3999bc34f4f0e44707419d60b37f5ba274/leetcode/2610.ConvertAnArrayIntoA2DArrayWithConditions) | Medium |
| 2706 | [Buy Two Chocolates](https://leetcode.com/problems/buy-two-chocolates) | [python](https://github.com/Mu7annad0/leetcode/blob/b99ff82b3db93c52e198a0432d7292c8792e591c/leetcode/2706.BuyTwoChocolates) | Easy |
| 2816 | [Double a Number Represented as a Linked List](https://leetcode.com/problems/double-a-number-represented-as-a-linked-list) | [python](https://github.com/Mu7annad0/leetcode/blob/29b8b979cb18069ad066a8bd8cd42364b9f96cf1/leetcode/2816.DoubleANumberRepresentedAsALinkedList) | Medium |
| 2870 | [Minimum Number of Operations to Make Array Empty](https://leetcode.com/problems/minimum-number-of-operations-to-make-array-empty) | [python](https://github.com/Mu7annad0/leetcode/blob/c6e42d1a098aad64a7483ecd328bead1e465fa29/leetcode/2870.MinimumNumberOfOperationsToMakeArrayEmpty) | Medium |
| 2938 | [Separate Black and White Balls](https://leetcode.com/problems/separate-black-and-white-balls/description/) | [python](https://github.com/Mu7annad0/leetcode/blob/4ae8f472de137a03a319d7471929cf0c1a05c979/leetcode/2938.SeparateBlackAndWhiteBalls) | Medium |
| 3075 | [Maximize Happiness of Select ed Children](https://leetcode.com/problems/maximize-happiness-of-selected-children) | [python](https://github.com/Mu7annad0/leetcode/blob/65a4ff57b9c51f9301851c7498ec81c8d36df6fb/leetcode/3075.MaximizeHappinessOfSelectedChildren) | Medium |