{"id":32618815,"url":"https://github.com/corphish/leetcode","last_synced_at":"2026-06-29T20:31:08.823Z","repository":{"id":55462757,"uuid":"465580048","full_name":"corphish/leetcode","owner":"corphish","description":"My solutions to the various leetcode problems","archived":false,"fork":false,"pushed_at":"2025-06-14T10:20:29.000Z","size":1150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T17:58:18.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/corphish.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,"zenodo":null}},"created_at":"2022-03-03T05:25:23.000Z","updated_at":"2025-06-14T10:20:34.000Z","dependencies_parsed_at":"2024-01-11T06:48:53.795Z","dependency_job_id":"5d561a58-e5b9-438e-8f06-dce87831b181","html_url":"https://github.com/corphish/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corphish/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corphish%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corphish%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corphish%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corphish%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corphish","download_url":"https://codeload.github.com/corphish/leetcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corphish%2Fleetcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34942665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-30T17:57:25.108Z","updated_at":"2026-06-29T20:31:08.803Z","avatar_url":"https://github.com/corphish.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCode solutions\nMy solutions to various problems on LeetCode. Solutions are written in Java. They are divided into various sections. Individual details of a problem are given in their respective sections. Here is my [leetcode profile link](https://leetcode.com/jorgophool/).\n\n## Solutions\nSolutions are grouped by its type and in most cases has a leetcode link associated to it. This is generated using the [readme generator util](readme_util/).\n\n#### Arrays\n|Solution|Leetcode Link|\n|--------|-----------|\n|[132Pattern](arrays/132Pattern.java)|[https://leetcode.com/problems/132-pattern/](https://leetcode.com/problems/132-pattern/)|\n|[3Sum](arrays/3Sum.java)|-|\n|[3SumClosest](arrays/3SumClosest.java)|[https://leetcode.com/problems/3sum-closest/](https://leetcode.com/problems/3sum-closest/)|\n|[3SumMulti](arrays/3SumMulti.java)|[https://leetcode.com/problems/3sum-with-multiplicity](https://leetcode.com/problems/3sum-with-multiplicity)|\n|[AlertUsingSameKeycard](arrays/AlertUsingSameKeycard.java)|[https://leetcode.com/problems/alert-using-same-key-card-three-or-more-times-in-a-one-hour-period](https://leetcode.com/problems/alert-using-same-key-card-three-or-more-times-in-a-one-hour-period)|\n|[AllBinaryCodes](arrays/AllBinaryCodes.java)|[https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k](https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k)|\n|[AlternatingColors1](arrays/AlternatingColors1.java)|[https://leetcode.com/problems/alternating-groups-i/](https://leetcode.com/problems/alternating-groups-i/)|\n|[AlternatingColors2](arrays/AlternatingColors2.java)|[https://leetcode.com/problems/alternating-groups-ii/](https://leetcode.com/problems/alternating-groups-ii/)|\n|[AntOnTheBoundary](arrays/AntOnTheBoundary.java)|[https://leetcode.com/problems/ant-on-the-boundary/](https://leetcode.com/problems/ant-on-the-boundary/)|\n|[ArrayOfDoubledPairs](arrays/ArrayOfDoubledPairs.java)|[https://leetcode.com/problems/array-of-doubled-pairs/](https://leetcode.com/problems/array-of-doubled-pairs/)|\n|[ArrayPairSum](arrays/ArrayPairSum.java)|[https://leetcode.com/problems/array-partition-i/](https://leetcode.com/problems/array-partition-i/)|\n|[ArrayTo2DArrayWithConditions](arrays/ArrayTo2DArrayWithConditions.java)|[https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions](https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions)|\n|[AsFarFromLandAsPossible](arrays/AsFarFromLandAsPossible.java)|[https://leetcode.com/problems/as-far-from-land-as-possible/](https://leetcode.com/problems/as-far-from-land-as-possible/)|\n|[AssignCookies](arrays/AssignCookies.java)|[https://leetcode.com/problems/assign-cookies](https://leetcode.com/problems/assign-cookies)|\n|[AverageWaitingTime](arrays/AverageWaitingTime.java)|[https://leetcode.com/problems/average-waiting-time](https://leetcode.com/problems/average-waiting-time)|\n|[BagOfTokens](arrays/BagOfTokens.java)|[https://leetcode.com/problems/bag-of-tokens](https://leetcode.com/problems/bag-of-tokens)|\n|[BestTimeToBuyOrSellStocks2](arrays/BestTimeToBuyOrSellStocks2.java)|[https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii)|\n|[BinarySubarraysWithSum](arrays/BinarySubarraysWithSum.java)|[https://leetcode.com/problems/binary-subarrays-with-sum](https://leetcode.com/problems/binary-subarrays-with-sum)|\n|[BoatSavePeople](arrays/BoatSavePeople.java)|-|\n|[BoatsToSavePeople](arrays/BoatsToSavePeople.java)|[https://leetcode.com/problems/boats-to-save-people/](https://leetcode.com/problems/boats-to-save-people/)|\n|[CalculateScoreAfterPerformingInstructions](arrays/CalculateScoreAfterPerformingInstructions.java)|[https://leetcode.com/problems/calculate-score-after-performing-instructions/](https://leetcode.com/problems/calculate-score-after-performing-instructions/)|\n|[Candy](arrays/Candy.java)|[https://leetcode.com/problems/candy](https://leetcode.com/problems/candy)|\n|[CanJump](arrays/CanJump.java)|[https://leetcode.com/problems/jump-game/](https://leetcode.com/problems/jump-game/)|\n|[CanPlaceFlowers](arrays/CanPlaceFlowers.java)|[https://leetcode.com/problems/can-place-flowers/](https://leetcode.com/problems/can-place-flowers/)|\n|[CapacityToShipPackageWithinDDays](arrays/CapacityToShipPackageWithinDDays.java)|[https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/)|\n|[CarPooling](arrays/CarPooling.java)|[https://leetcode.com/problems/car-pooling/](https://leetcode.com/problems/car-pooling/)|\n|[CheckIfArrayPairsAreDivisibleByK](arrays/CheckIfArrayPairsAreDivisibleByK.java)|[https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k](https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k)|\n|[ClosestEqualElementQueries](arrays/ClosestEqualElementQueries.java)|[https://leetcode.com/problems/closest-equal-element-queries/](https://leetcode.com/problems/closest-equal-element-queries/)|\n|[CombinationSum](arrays/CombinationSum.java)|[https://leetcode.com/problems/combination-sum](https://leetcode.com/problems/combination-sum)|\n|[CombinationSum3](arrays/CombinationSum3.java)|[https://leetcode.com/problems/combination-sum-iii](https://leetcode.com/problems/combination-sum-iii)|\n|[ContainsDuplicates](arrays/ContainsDuplicates.java)|-|\n|[ContainsNearbyDuplicates](arrays/ContainsNearbyDuplicates.java)|[https://leetcode.com/problems/contains-duplicate-ii](https://leetcode.com/problems/contains-duplicate-ii)|\n|[ContiguousArray](arrays/ContiguousArray.java)|[https://leetcode.com/problems/contiguous-array/](https://leetcode.com/problems/contiguous-array/)|\n|[ContinuousSubarraySum](arrays/ContinuousSubarraySum.java)|[https://leetcode.com/problems/continuous-subarray-sum](https://leetcode.com/problems/continuous-subarray-sum)|\n|[Convert1DArrayTo2DArray](arrays/Convert1DArrayTo2DArray.java)|[https://leetcode.com/problems/convert-1d-array-into-2d-array](https://leetcode.com/problems/convert-1d-array-into-2d-array)|\n|[ConvertTo2DArrayWithConditions](arrays/ConvertTo2DArrayWithConditions.java)|[https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions](https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions)|\n|[CorporateFlightBookings](arrays/CorporateFlightBookings.java)|[https://leetcode.com/problems/corporate-flight-bookings](https://leetcode.com/problems/corporate-flight-bookings)|\n|[CountCompleteSubarraysInArray](arrays/CountCompleteSubarraysInArray.java)|[https://leetcode.com/problems/count-complete-subarrays-in-an-array](https://leetcode.com/problems/count-complete-subarrays-in-an-array)|\n|[CountDistinctIntegersAfterReverseOperations](arrays/CountDistinctIntegersAfterReverseOperations.java)|[https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations](https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations)|\n|[CountElementsWithMaximumFrequency](arrays/CountElementsWithMaximumFrequency.java)|[https://leetcode.com/problems/count-elements-with-maximum-frequency/](https://leetcode.com/problems/count-elements-with-maximum-frequency/)|\n|[CountGoodTriplets](arrays/CountGoodTriplets.java)|[https://leetcode.com/problems/count-good-triplets/](https://leetcode.com/problems/count-good-triplets/)|\n|[CountNumberOfBadPairs](arrays/CountNumberOfBadPairs.java)|[https://leetcode.com/problems/count-number-of-bad-pairs/](https://leetcode.com/problems/count-number-of-bad-pairs/)|\n|[CountNumberOfFairPairs](arrays/CountNumberOfFairPairs.java)|[https://leetcode.com/problems/count-the-number-of-fair-pairs](https://leetcode.com/problems/count-the-number-of-fair-pairs)|\n|[CountNumberOfNiceSubarrays](arrays/CountNumberOfNiceSubarrays.java)|[https://leetcode.com/problems/count-number-of-nice-subarrays](https://leetcode.com/problems/count-number-of-nice-subarrays)|\n|[CountPairsThatFormACompleteDay1](arrays/CountPairsThatFormACompleteDay1.java)|[https://leetcode.com/problems/count-pairs-that-form-a-complete-day-i](https://leetcode.com/problems/count-pairs-that-form-a-complete-day-i)|\n|[CountPairsThatFormACompleteDay2](arrays/CountPairsThatFormACompleteDay2.java)|[https://leetcode.com/problems/count-pairs-that-form-a-complete-day-ii](https://leetcode.com/problems/count-pairs-that-form-a-complete-day-ii)|\n|[CountServersThatCommunicate](arrays/CountServersThatCommunicate.java)|[https://leetcode.com/problems/count-servers-that-communicate](https://leetcode.com/problems/count-servers-that-communicate)|\n|[CountSubarraysOfLength3WithCondition](arrays/CountSubarraysOfLength3WithCondition.java)|[https://leetcode.com/problems/count-subarrays-of-length-three-with-a-condition](https://leetcode.com/problems/count-subarrays-of-length-three-with-a-condition)|\n|[CountSubarraysWhereMaxElementAppearsAtleastKTimes](arrays/CountSubarraysWhereMaxElementAppearsAtleastKTimes.java)|[https://leetcode.com/problems/count-subarrays-where-max-element-appears-at-least-k-times](https://leetcode.com/problems/count-subarrays-where-max-element-appears-at-least-k-times)|\n|[CountSubarraysWithFixedBounds](arrays/CountSubarraysWithFixedBounds.java)|[https://leetcode.com/problems/count-subarrays-with-fixed-bounds](https://leetcode.com/problems/count-subarrays-with-fixed-bounds)|\n|[CountTestedDevicesAfterTestOperations](arrays/CountTestedDevicesAfterTestOperations.java)|[https://leetcode.com/problems/count-tested-devices-after-test-operations/](https://leetcode.com/problems/count-tested-devices-after-test-operations/)|\n|[CountTheNumberOfGoodSubarrays](arrays/CountTheNumberOfGoodSubarrays.java)|[https://leetcode.com/problems/count-the-number-of-good-subarrays/](https://leetcode.com/problems/count-the-number-of-good-subarrays/)|\n|[DecompressRunLengthEncodedList](arrays/DecompressRunLengthEncodedList.java)|[https://leetcode.com/problems/decompress-run-length-encoded-list/](https://leetcode.com/problems/decompress-run-length-encoded-list/)|\n|[DefuseTheBomb](arrays/DefuseTheBomb.java)|[https://leetcode.com/problems/defuse-the-bomb](https://leetcode.com/problems/defuse-the-bomb)|\n|[DetermineTheWinnerOfBowlingGame](arrays/DetermineTheWinnerOfBowlingGame.java)|[https://leetcode.com/problems/determine-the-winner-of-a-bowling-game/](https://leetcode.com/problems/determine-the-winner-of-a-bowling-game/)|\n|[DiagonalTraverse2](arrays/DiagonalTraverse2.java)|[https://leetcode.com/problems/diagonal-traverse-ii](https://leetcode.com/problems/diagonal-traverse-ii)|\n|[DisplayTableOfFoodOrdersInRestaurant](arrays/DisplayTableOfFoodOrdersInRestaurant.java)|[https://leetcode.com/problems/display-table-of-food-orders-in-a-restaurant](https://leetcode.com/problems/display-table-of-food-orders-in-a-restaurant)|\n|[DivideArrayInSetsOfKConsecturiveNumber](arrays/DivideArrayInSetsOfKConsecturiveNumber.java)|[https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers](https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers)|\n|[DivideArrayIntoArraysWithMaxDifference](arrays/DivideArrayIntoArraysWithMaxDifference.java)|[https://leetcode.com/problems/divide-array-into-arrays-with-max-difference/](https://leetcode.com/problems/divide-array-into-arrays-with-max-difference/)|\n|[DividePlayersIntoTeamsOfEqualSkill](arrays/DividePlayersIntoTeamsOfEqualSkill.java)|[https://leetcode.com/problems/divide-players-into-teams-of-equal-skill](https://leetcode.com/problems/divide-players-into-teams-of-equal-skill)|\n|[Dota2Senate](arrays/Dota2Senate.java)|[https://leetcode.com/problems/dota2-senate](https://leetcode.com/problems/dota2-senate)|\n|[EarliestPossibleDayOfFullBloom](arrays/EarliestPossibleDayOfFullBloom.java)|[https://leetcode.com/problems/earliest-possible-day-of-full-bloom](https://leetcode.com/problems/earliest-possible-day-of-full-bloom)|\n|[EatPizzas](arrays/EatPizzas.java)|[https://leetcode.com/problems/eat-pizzas/](https://leetcode.com/problems/eat-pizzas/)|\n|[EmployeeImportance](arrays/EmployeeImportance.java)|[https://leetcode.com/problems/employee-importance](https://leetcode.com/problems/employee-importance)|\n|[EqualRowAndColumnPairs](arrays/EqualRowAndColumnPairs.java)|[https://leetcode.com/problems/equal-row-and-column-pairs](https://leetcode.com/problems/equal-row-and-column-pairs)|\n|[FinalPricesWithDiscountInShop](arrays/FinalPricesWithDiscountInShop.java)|[https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/](https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/)|\n|[FindAllDuplicatesInArray](arrays/FindAllDuplicatesInArray.java)|[https://leetcode.com/problems/find-all-duplicates-in-an-array](https://leetcode.com/problems/find-all-duplicates-in-an-array)|\n|[FindCommonElementsBetween2Arrays](arrays/FindCommonElementsBetween2Arrays.java)|[https://leetcode.com/problems/find-common-elements-between-two-arrays](https://leetcode.com/problems/find-common-elements-between-two-arrays)|\n|[FindDisappearedNumbers](arrays/FindDisappearedNumbers.java)|[https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array)|\n|[FindEvenNumber](arrays/FindEvenNumber.java)|[https://leetcode.com/problems/finding-3-digit-even-numbers](https://leetcode.com/problems/finding-3-digit-even-numbers)|\n|[FindFirstAndLastElementsInSortedArray](arrays/FindFirstAndLastElementsInSortedArray.java)|[https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)|\n|[FindIfArrayCanBeSorted](arrays/FindIfArrayCanBeSorted.java)|[https://leetcode.com/problems/find-if-array-can-be-sorted/](https://leetcode.com/problems/find-if-array-can-be-sorted/)|\n|[FindInMountainArray](arrays/FindInMountainArray.java)|[https://leetcode.com/problems/find-in-mountain-array/submissions/1146749102/](https://leetcode.com/problems/find-in-mountain-array/submissions/1146749102/)|\n|[FindKPairsWithSmallestSum](arrays/FindKPairsWithSmallestSum.java)|[https://leetcode.com/problems/find-k-pairs-with-smallest-sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums)|\n|[FindKthSmallestPairDistance](arrays/FindKthSmallestPairDistance.java)|[https://leetcode.com/problems/find-k-th-smallest-pair-distance](https://leetcode.com/problems/find-k-th-smallest-pair-distance)|\n|[FindMinimumOperationsToMakeAllElementsDivisibleBy3](arrays/FindMinimumOperationsToMakeAllElementsDivisibleBy3.java)|[https://leetcode.com/problems/find-minimum-operations-to-make-all-elements-divisible-by-three/](https://leetcode.com/problems/find-minimum-operations-to-make-all-elements-divisible-by-three/)|\n|[FindMissingAndRepeatedValues](arrays/FindMissingAndRepeatedValues.java)|[https://leetcode.com/problems/find-missing-and-repeated-values/](https://leetcode.com/problems/find-missing-and-repeated-values/)|\n|[FindNumberOfGoodPairs1](arrays/FindNumberOfGoodPairs1.java)|[https://leetcode.com/problems/find-the-number-of-good-pairs-i/](https://leetcode.com/problems/find-the-number-of-good-pairs-i/)|\n|[FindNumberOfGoodPairs2](arrays/FindNumberOfGoodPairs2.java)|[https://leetcode.com/problems/find-the-number-of-good-pairs-ii/](https://leetcode.com/problems/find-the-number-of-good-pairs-ii/)|\n|[FindOccurencesOfAnElementInAnArray](arrays/FindOccurencesOfAnElementInAnArray.java)|[https://leetcode.com/problems/find-occurrences-of-an-element-in-an-array/](https://leetcode.com/problems/find-occurrences-of-an-element-in-an-array/)|\n|[FindOriginalFromDoubledArray](arrays/FindOriginalFromDoubledArray.java)|[https://leetcode.com/problems/find-original-array-from-doubled-array](https://leetcode.com/problems/find-original-array-from-doubled-array)|\n|[FindPeakElement](arrays/FindPeakElement.java)|[https://leetcode.com/problems/find-peak-element](https://leetcode.com/problems/find-peak-element)|\n|[FindPivotIndex](arrays/FindPivotIndex.java)|[https://leetcode.com/problems/find-pivot-index/](https://leetcode.com/problems/find-pivot-index/)|\n|[FindPlayersWithZeroOrOneLosses](arrays/FindPlayersWithZeroOrOneLosses.java)|[https://leetcode.com/problems/find-players-with-zero-or-one-losses/](https://leetcode.com/problems/find-players-with-zero-or-one-losses/)|\n|[FindScoreOfAnArrayAfterMarkingAllElements](arrays/FindScoreOfAnArrayAfterMarkingAllElements.java)|[https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements](https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements)|\n|[FindSmallestDivisorGivenThreshold](arrays/FindSmallestDivisorGivenThreshold.java)|[https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold)|\n|[FindTheDifferenceOfTwoArrays](arrays/FindTheDifferenceOfTwoArrays.java)|[https://leetcode.com/problems/find-the-difference-of-two-arrays](https://leetcode.com/problems/find-the-difference-of-two-arrays)|\n|[FindTheDistinctDifferenceArray](arrays/FindTheDistinctDifferenceArray.java)|[https://leetcode.com/problems/find-the-distinct-difference-array/](https://leetcode.com/problems/find-the-distinct-difference-array/)|\n|[FindTheIntegerAddedToArray2](arrays/FindTheIntegerAddedToArray2.java)|[https://leetcode.com/problems/find-the-integer-added-to-array-ii/](https://leetcode.com/problems/find-the-integer-added-to-array-ii/)|\n|[FindTheLargestAlmostMissingInteger](arrays/FindTheLargestAlmostMissingInteger.java)|[https://leetcode.com/problems/find-the-largest-almost-missing-integer/](https://leetcode.com/problems/find-the-largest-almost-missing-integer/)|\n|[FindTheMiddleIndexInArray](arrays/FindTheMiddleIndexInArray.java)|[https://leetcode.com/problems/find-the-middle-index-in-array/](https://leetcode.com/problems/find-the-middle-index-in-array/)|\n|[FindTheNumberOfDistinctColorsAmongBalls](arrays/FindTheNumberOfDistinctColorsAmongBalls.java)|[https://leetcode.com/problems/find-the-number-of-distinct-colors-among-the-balls](https://leetcode.com/problems/find-the-number-of-distinct-colors-among-the-balls)|\n|[FindThePeaks](arrays/FindThePeaks.java)|[https://leetcode.com/problems/find-the-peaks/](https://leetcode.com/problems/find-the-peaks/)|\n|[FindThePowerOfKSizeSubarrays1](arrays/FindThePowerOfKSizeSubarrays1.java)|[https://leetcode.com/problems/find-the-power-of-k-size-subarrays-i](https://leetcode.com/problems/find-the-power-of-k-size-subarrays-i)|\n|[FindThePowerOfKSizeSubarrays2](arrays/FindThePowerOfKSizeSubarrays2.java)|[https://leetcode.com/problems/find-the-power-of-k-size-subarrays-ii](https://leetcode.com/problems/find-the-power-of-k-size-subarrays-ii)|\n|[FindTheStudentThatWillReplaceChalk](arrays/FindTheStudentThatWillReplaceChalk.java)|[https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk](https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk)|\n|[FindValidMatrixGivenRowAndColumnSums](arrays/FindValidMatrixGivenRowAndColumnSums.java)|[https://leetcode.com/problems/find-valid-matrix-given-row-and-column-sums](https://leetcode.com/problems/find-valid-matrix-given-row-and-column-sums)|\n|[FirstCompletelyPaintedRowOrColumn](arrays/FirstCompletelyPaintedRowOrColumn.java)|[https://leetcode.com/problems/first-completely-painted-row-or-column](https://leetcode.com/problems/first-completely-painted-row-or-column)|\n|[FlippingAnImage](arrays/FlippingAnImage.java)|[https://leetcode.com/problems/flipping-an-image/](https://leetcode.com/problems/flipping-an-image/)|\n|[FruitsIntoBasket](arrays/FruitsIntoBasket.java)|[https://leetcode.com/problems/fruit-into-baskets/](https://leetcode.com/problems/fruit-into-baskets/)|\n|[GameOfLife](arrays/GameOfLife.java)|[https://leetcode.com/problems/game-of-life](https://leetcode.com/problems/game-of-life)|\n|[GasStation](arrays/GasStation.java)|[https://leetcode.com/problems/gas-station/](https://leetcode.com/problems/gas-station/)|\n|[GroupPeople](arrays/GroupPeople.java)|[https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to)|\n|[GroupThePeopleGivenTheGroupSizeTheyBelongTo](arrays/GroupThePeopleGivenTheGroupSizeTheyBelongTo.java)|[https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to)|\n|[GrumpyBookStoreOwner](arrays/GrumpyBookStoreOwner.java)|[https://leetcode.com/problems/grumpy-bookstore-owner](https://leetcode.com/problems/grumpy-bookstore-owner)|\n|[HandOfStraights](arrays/HandOfStraights.java)|[https://leetcode.com/problems/hand-of-straights](https://leetcode.com/problems/hand-of-straights)|\n|[HighestAltitude](arrays/HighestAltitude.java)|[https://leetcode.com/problems/find-the-highest-altitude](https://leetcode.com/problems/find-the-highest-altitude)|\n|[HIndex](arrays/HIndex.java)|[https://leetcode.com/problems/h-index/](https://leetcode.com/problems/h-index/)|\n|[HIndex2](arrays/HIndex2.java)|[https://leetcode.com/problems/h-index-ii](https://leetcode.com/problems/h-index-ii)|\n|[IncreasingTripletSubsequence](arrays/IncreasingTripletSubsequence.java)|[https://leetcode.com/problems/increasing-triplet-subsequence](https://leetcode.com/problems/increasing-triplet-subsequence)|\n|[IntersectionOf2Arrays](arrays/IntersectionOf2Arrays.java)|[https://leetcode.com/problems/intersection-of-two-arrays](https://leetcode.com/problems/intersection-of-two-arrays)|\n|[IntersectionOf2Arrays2](arrays/IntersectionOf2Arrays2.java)|[https://leetcode.com/problems/intersection-of-two-arrays-ii](https://leetcode.com/problems/intersection-of-two-arrays-ii)|\n|[JumpGame2](arrays/JumpGame2.java)|[https://leetcode.com/problems/jump-game-ii/](https://leetcode.com/problems/jump-game-ii/)|\n|[KDivisibleElementsInSubarrays](arrays/KDivisibleElementsInSubarrays.java)|[https://leetcode.com/problems/k-divisible-elements-subarrays](https://leetcode.com/problems/k-divisible-elements-subarrays)|\n|[KidsWithTheGreatestNumberOfCandies](arrays/KidsWithTheGreatestNumberOfCandies.java)|[https://leetcode.com/problems/kids-with-the-greatest-number-of-candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies)|\n|[KokoEatingBananas](arrays/KokoEatingBananas.java)|[https://leetcode.com/problems/koko-eating-bananas/](https://leetcode.com/problems/koko-eating-bananas/)|\n|[KRadiusSubarrayAverages](arrays/KRadiusSubarrayAverages.java)|[https://leetcode.com/problems/k-radius-subarray-averages/](https://leetcode.com/problems/k-radius-subarray-averages/)|\n|[KthElementInSortedMatrix](arrays/KthElementInSortedMatrix.java)|-|\n|[KthLargestElementInStream](arrays/KthLargestElementInStream.java)|[https://leetcode.com/problems/kth-largest-element-in-a-stream/](https://leetcode.com/problems/kth-largest-element-in-a-stream/)|\n|[KthSmallestPrimeFraction](arrays/KthSmallestPrimeFraction.java)|[https://leetcode.com/problems/k-th-smallest-prime-fraction](https://leetcode.com/problems/k-th-smallest-prime-fraction)|\n|[KthSmallestTrimmedNumber](arrays/KthSmallestTrimmedNumber.java)|[https://leetcode.com/problems/query-kth-smallest-trimmed-number](https://leetcode.com/problems/query-kth-smallest-trimmed-number)|\n|[KWeakestRowsInAMatrix.kt](arrays/KWeakestRowsInAMatrix.kt)|[https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix](https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix)|\n|[LargestNumber](arrays/LargestNumber.java)|[https://leetcode.com/problems/largest-number](https://leetcode.com/problems/largest-number)|\n|[LargestNumberAtleastTwiceOfOthers](arrays/LargestNumberAtleastTwiceOfOthers.java)|[https://leetcode.com/problems/largest-number-at-least-twice-of-others/](https://leetcode.com/problems/largest-number-at-least-twice-of-others/)|\n|[LargestPositiveNumberThatExistsWithItsNegative](arrays/LargestPositiveNumberThatExistsWithItsNegative.java)|[https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative](https://leetcode.com/problems/largest-positive-integer-that-exists-with-its-negative)|\n|[LargestValuesFromLabels](arrays/LargestValuesFromLabels.java)|[https://leetcode.com/problems/largest-values-from-labels/](https://leetcode.com/problems/largest-values-from-labels/)|\n|[LastStoneWeight](arrays/LastStoneWeight.java)|[https://leetcode.com/problems/last-stone-weight](https://leetcode.com/problems/last-stone-weight)|\n|[LeastNumberOfUniqueIntegersAfterKRemovals](arrays/LeastNumberOfUniqueIntegersAfterKRemovals.java)|[https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals/](https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals/)|\n|[LemonadeChange](arrays/LemonadeChange.java)|[https://leetcode.com/problems/lemonade-change](https://leetcode.com/problems/lemonade-change)|\n|[LengthOfLongestSubarrayWithAtmostKFrequency](arrays/LengthOfLongestSubarrayWithAtmostKFrequency.java)|[https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency](https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency)|\n|[LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit](arrays/LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit.java)|[https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit](https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit)|\n|[LongestSubarrayOf1sAfterDeletingOneElement](arrays/LongestSubarrayOf1sAfterDeletingOneElement.java)|[https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element](https://leetcode.com/problems/longest-subarray-of-1s-after-deleting-one-element)|\n|[LongestSubsequenceWithLimitedSum](arrays/LongestSubsequenceWithLimitedSum.java)|[https://leetcode.com/problems/longest-subsequence-with-limited-sum/](https://leetcode.com/problems/longest-subsequence-with-limited-sum/)|\n|[LongestValidObstacleAtEachPosition](arrays/LongestValidObstacleAtEachPosition.java)|[https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position](https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position)|\n|[LuckyNumbersInAMatrix](arrays/LuckyNumbersInAMatrix.java)|[https://leetcode.com/problems/lucky-numbers-in-a-matrix/](https://leetcode.com/problems/lucky-numbers-in-a-matrix/)|\n|[MajorityElement](arrays/MajorityElement.java)|[https://leetcode.com/problems/majority-element](https://leetcode.com/problems/majority-element)|\n|[MaxChunksToMakeArraySorted](arrays/MaxChunksToMakeArraySorted.java)|[https://leetcode.com/problems/max-chunks-to-make-sorted](https://leetcode.com/problems/max-chunks-to-make-sorted)|\n|[MaxChunksToMakeArraySorted2](arrays/MaxChunksToMakeArraySorted2.java)|[https://leetcode.com/problems/max-chunks-to-make-sorted-ii/](https://leetcode.com/problems/max-chunks-to-make-sorted-ii/)|\n|[MaxConsecutiveOnes3](arrays/MaxConsecutiveOnes3.java)|[https://leetcode.com/problems/max-consecutive-ones-iii](https://leetcode.com/problems/max-consecutive-ones-iii)|\n|[MaximizeTheConfusionOfAnExam](arrays/MaximizeTheConfusionOfAnExam.java)|[https://leetcode.com/problems/maximize-the-confusion-of-an-exam](https://leetcode.com/problems/maximize-the-confusion-of-an-exam)|\n|[MaximizeTheTotalHeightOfUniqueTowers](arrays/MaximizeTheTotalHeightOfUniqueTowers.java)|[https://leetcode.com/problems/maximize-the-total-height-of-unique-towers](https://leetcode.com/problems/maximize-the-total-height-of-unique-towers)|\n|[MaximumAscendingSubarray](arrays/MaximumAscendingSubarray.java)|[https://leetcode.com/problems/maximum-ascending-subarray-sum](https://leetcode.com/problems/maximum-ascending-subarray-sum)|\n|[MaximumBagsWithFullCapacityRocks](arrays/MaximumBagsWithFullCapacityRocks.java)|[https://leetcode.com/problems/maximum-bags-with-full-capacity-of-rocks/](https://leetcode.com/problems/maximum-bags-with-full-capacity-of-rocks/)|\n|[MaximumDistanceInArrays](arrays/MaximumDistanceInArrays.java)|[https://leetcode.com/problems/maximum-distance-in-arrays](https://leetcode.com/problems/maximum-distance-in-arrays)|\n|[MaximumEqualFrequency](arrays/MaximumEqualFrequency.java)|[https://leetcode.com/problems/maximum-equal-frequency](https://leetcode.com/problems/maximum-equal-frequency)|\n|[MaximumIcecreamBars](arrays/MaximumIcecreamBars.java)|[https://leetcode.com/problems/maximum-ice-cream-bars](https://leetcode.com/problems/maximum-ice-cream-bars)|\n|[MaximumLengthOfPairChain](arrays/MaximumLengthOfPairChain.java)|[https://leetcode.com/problems/maximum-length-of-pair-chain/](https://leetcode.com/problems/maximum-length-of-pair-chain/)|\n|[MaximumLengthOfRepeatedSubarray](arrays/MaximumLengthOfRepeatedSubarray.java)|[https://leetcode.com/problems/maximum-length-of-repeated-subarray/](https://leetcode.com/problems/maximum-length-of-repeated-subarray/)|\n|[MaximumMatrixSum](arrays/MaximumMatrixSum.java)|[https://leetcode.com/problems/maximum-matrix-sum](https://leetcode.com/problems/maximum-matrix-sum)|\n|[MaximumNumberOfCoinsYouCanGet](arrays/MaximumNumberOfCoinsYouCanGet.java)|[https://leetcode.com/problems/maximum-number-of-coins-you-can-get](https://leetcode.com/problems/maximum-number-of-coins-you-can-get)|\n|[MaximumNumberOfGroupsEnteringACompetition](arrays/MaximumNumberOfGroupsEnteringACompetition.java)|[https://leetcode.com/problems/maximum-number-of-groups-entering-a-competition](https://leetcode.com/problems/maximum-number-of-groups-entering-a-competition)|\n|[MaximumNumberOfPairsInArray](arrays/MaximumNumberOfPairsInArray.java)|[https://leetcode.com/problems/maximum-number-of-pairs-in-array](https://leetcode.com/problems/maximum-number-of-pairs-in-array)|\n|[MaximumPairSumInArray](arrays/MaximumPairSumInArray.java)|[https://leetcode.com/problems/max-pair-sum-in-an-array/](https://leetcode.com/problems/max-pair-sum-in-an-array/)|\n|[MaximumProduct](arrays/MaximumProduct.java)|-|\n|[MaximumSumOfAnHourglass](arrays/MaximumSumOfAnHourglass.java)|[https://leetcode.com/problems/maximum-sum-of-an-hourglass/](https://leetcode.com/problems/maximum-sum-of-an-hourglass/)|\n|[MaximumSumOfDistinctSubarraysWithLengthK](arrays/MaximumSumOfDistinctSubarraysWithLengthK.java)|[https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k](https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k)|\n|[MaximumSwaps](arrays/MaximumSwaps.java)|[https://leetcode.com/problems/maximum-swap](https://leetcode.com/problems/maximum-swap)|\n|[MaximumWidthRamp](arrays/MaximumWidthRamp.java)|[https://leetcode.com/problems/maximum-width-ramp](https://leetcode.com/problems/maximum-width-ramp)|\n|[MaxIncreaseToKeepCitySkylineSame](arrays/MaxIncreaseToKeepCitySkylineSame.java)|[https://leetcode.com/problems/max-increase-to-keep-city-skyline](https://leetcode.com/problems/max-increase-to-keep-city-skyline)|\n|[MaxNumberOfKSumPairs](arrays/MaxNumberOfKSumPairs.java)|[https://leetcode.com/problems/max-number-of-k-sum-pairs](https://leetcode.com/problems/max-number-of-k-sum-pairs)|\n|[MedianOf2SortedArrays](arrays/MedianOf2SortedArrays.java)|[https://leetcode.com/problems/median-of-two-sorted-arrays](https://leetcode.com/problems/median-of-two-sorted-arrays)|\n|[MergeSortedArrays](arrays/MergeSortedArrays.java)|-|\n|[MergeTriplets](arrays/MergeTriplets.java)|[https://leetcode.com/problems/merge-triplets-to-form-target-triplet/](https://leetcode.com/problems/merge-triplets-to-form-target-triplet/)|\n|[MinCostToMoveChips](arrays/MinCostToMoveChips.java)|-|\n|[MinFunctionCallsToMakeTargetArray](arrays/MinFunctionCallsToMakeTargetArray.java)|[https://leetcode.com/problems/minimum-numbers-of-function-calls-to-make-target-array](https://leetcode.com/problems/minimum-numbers-of-function-calls-to-make-target-array)|\n|[MinimizedMaximumOfProductsDistributedToAnyStore](arrays/MinimizedMaximumOfProductsDistributedToAnyStore.java)|[https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store](https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store)|\n|[MinimizeMaximumOfArray](arrays/MinimizeMaximumOfArray.java)|[https://leetcode.com/problems/minimize-maximum-of-array](https://leetcode.com/problems/minimize-maximum-of-array)|\n|[MinimizeMaximumPairSumInArray](arrays/MinimizeMaximumPairSumInArray.java)|[https://leetcode.com/problems/minimize-maximum-pair-sum-in-array](https://leetcode.com/problems/minimize-maximum-pair-sum-in-array)|\n|[MinimumAmountOfTimeToCollectGarbage](arrays/MinimumAmountOfTimeToCollectGarbage.java)|[https://leetcode.com/problems/minimum-amount-of-time-to-collect-garbage](https://leetcode.com/problems/minimum-amount-of-time-to-collect-garbage)|\n|[MinimumAverageDifference](arrays/MinimumAverageDifference.java)|[https://leetcode.com/problems/minimum-average-difference](https://leetcode.com/problems/minimum-average-difference)|\n|[MinimumAverageOfSmallestLargestElements](arrays/MinimumAverageOfSmallestLargestElements.java)|[https://leetcode.com/problems/minimum-average-of-smallest-and-largest-elements/submissions/1317355156/](https://leetcode.com/problems/minimum-average-of-smallest-and-largest-elements/submissions/1317355156/)|\n|[MinimumCommonValue](arrays/MinimumCommonValue.java)|[https://leetcode.com/problems/minimum-common-value](https://leetcode.com/problems/minimum-common-value)|\n|[MinimumCostToMakeArrayEqual](arrays/MinimumCostToMakeArrayEqual.java)|[https://leetcode.com/problems/minimum-cost-to-make-array-equal](https://leetcode.com/problems/minimum-cost-to-make-array-equal)|\n|[MinimumCostToReachEveryPosition](arrays/MinimumCostToReachEveryPosition.java)|[https://leetcode.com/problems/minimum-cost-to-reach-every-position/](https://leetcode.com/problems/minimum-cost-to-reach-every-position/)|\n|[MinimumDifferenceBetweenLargestAndSmallestValuesIn3Moves](arrays/MinimumDifferenceBetweenLargestAndSmallestValuesIn3Moves.java)|[https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/](https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/)|\n|[MinimumInRotatedSortedArray](arrays/MinimumInRotatedSortedArray.java)|[https://leetcode.com/problems/find-minimum-in-rotated-sorted-array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array)|\n|[MinimumLimitOfBallsInABag](arrays/MinimumLimitOfBallsInABag.java)|[https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag/](https://leetcode.com/problems/minimum-limit-of-balls-in-a-bag/)|\n|[MinimumNumberGame](arrays/MinimumNumberGame.java)|[https://leetcode.com/problems/minimum-number-game/](https://leetcode.com/problems/minimum-number-game/)|\n|[MinimumNumberOfChairsInAWaitingRoom](arrays/MinimumNumberOfChairsInAWaitingRoom.java)|[https://leetcode.com/problems/minimum-number-of-chairs-in-a-waiting-room/](https://leetcode.com/problems/minimum-number-of-chairs-in-a-waiting-room/)|\n|[MinimumNumberOfDaysToMakeNBouqets](arrays/MinimumNumberOfDaysToMakeNBouqets.java)|[https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets](https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets)|\n|[MinimumNumberOfKConsecutiveBitFlips](arrays/MinimumNumberOfKConsecutiveBitFlips.java)|[https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips](https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips)|\n|[MinimumOperationsToExceedThresholdValue1](arrays/MinimumOperationsToExceedThresholdValue1.java)|[https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-i/](https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-i/)|\n|[MinimumOperationsToMakeArrayEqual](arrays/MinimumOperationsToMakeArrayEqual.java)|[https://leetcode.com/problems/minimum-operations-to-make-array-equal/](https://leetcode.com/problems/minimum-operations-to-make-array-equal/)|\n|[MinimumOperationsToMakeBinaryArrayEqualToOne1](arrays/MinimumOperationsToMakeBinaryArrayEqualToOne1.java)|[https://leetcode.com/problems/minimum-operations-to-make-binary-array-elements-equal-to-one-i](https://leetcode.com/problems/minimum-operations-to-make-binary-array-elements-equal-to-one-i)|\n|[MinimumOperationsToReduceXToZero](arrays/MinimumOperationsToReduceXToZero.java)|[https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero](https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero)|\n|[MinimumOperationsToReInitPermutation](arrays/MinimumOperationsToReInitPermutation.java)|[https://leetcode.com/problems/minimum-number-of-operations-to-reinitialize-a-permutation](https://leetcode.com/problems/minimum-number-of-operations-to-reinitialize-a-permutation)|\n|[MinimumPenaltyForAShop](arrays/MinimumPenaltyForAShop.java)|[https://leetcode.com/problems/minimum-penalty-for-a-shop](https://leetcode.com/problems/minimum-penalty-for-a-shop)|\n|[MinimumReplacementsToSortArray](arrays/MinimumReplacementsToSortArray.java)|[https://leetcode.com/problems/minimum-replacements-to-sort-the-array](https://leetcode.com/problems/minimum-replacements-to-sort-the-array)|\n|[MinimumRoundsToCompleteAllTasks](arrays/MinimumRoundsToCompleteAllTasks.java)|[https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks/](https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks/)|\n|[MinimumSizeSubarraySum](arrays/MinimumSizeSubarraySum.java)|-|\n|[MinimumTimeDifference](arrays/MinimumTimeDifference.java)|[https://leetcode.com/problems/minimum-time-difference/](https://leetcode.com/problems/minimum-time-difference/)|\n|[MinimumTimeToCompleteTrips](arrays/MinimumTimeToCompleteTrips.java)|[https://leetcode.com/problems/minimum-time-to-complete-trips/](https://leetcode.com/problems/minimum-time-to-complete-trips/)|\n|[MinimumWindowSubstring](arrays/MinimumWindowSubstring.java)|[https://leetcode.com/problems/minimum-window-substring](https://leetcode.com/problems/minimum-window-substring)|\n|[MinMovesToMakeArrayZigzag](arrays/MinMovesToMakeArrayZigzag.java)|[https://leetcode.com/problems/decrease-elements-to-make-array-zigzag](https://leetcode.com/problems/decrease-elements-to-make-array-zigzag)|\n|[MinOperationsToMakeArrayIncreasing](arrays/MinOperationsToMakeArrayIncreasing.java)|[https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing](https://leetcode.com/problems/minimum-operations-to-make-the-array-increasing)|\n|[MinOperationsToMoveAllBallsToEachBox](arrays/MinOperationsToMoveAllBallsToEachBox.java)|[https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box](https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box)|\n|[MissingNumber](arrays/MissingNumber.java)|[https://leetcode.com/problems/missing-number](https://leetcode.com/problems/missing-number)|\n|[ModifyTheMatrix](arrays/ModifyTheMatrix.java)|[https://leetcode.com/problems/modify-the-matrix](https://leetcode.com/problems/modify-the-matrix)|\n|[MostBeautifulItemForEachQuery](arrays/MostBeautifulItemForEachQuery.java)|[https://leetcode.com/problems/most-beautiful-item-for-each-query/](https://leetcode.com/problems/most-beautiful-item-for-each-query/)|\n|[MostFrequentEvenElement](arrays/MostFrequentEvenElement.java)|[https://leetcode.com/problems/most-frequent-even-element](https://leetcode.com/problems/most-frequent-even-element)|\n|[MostPopularVideoCreator](arrays/MostPopularVideoCreator.java)|[https://leetcode.com/problems/most-popular-video-creator/](https://leetcode.com/problems/most-popular-video-creator/)|\n|[MostProfitAssigningWork](arrays/MostProfitAssigningWork.java)|[https://leetcode.com/problems/most-profit-assigning-work](https://leetcode.com/problems/most-profit-assigning-work)|\n|[NamingACompany](arrays/NamingACompany.java)|[https://leetcode.com/problems/naming-a-company/](https://leetcode.com/problems/naming-a-company/)|\n|[NextGreaterElement](arrays/NextGreaterElement.java)|[https://leetcode.com/problems/next-greater-element-i](https://leetcode.com/problems/next-greater-element-i)|\n|[NextGreaterElement2](arrays/NextGreaterElement2.java)|[https://leetcode.com/problems/next-greater-element-ii](https://leetcode.com/problems/next-greater-element-ii)|\n|[NonDecreasingArray](arrays/NonDecreasingArray.java)|[https://leetcode.com/problems/non-decreasing-array](https://leetcode.com/problems/non-decreasing-array)|\n|[NonDecreasingSubsequences](arrays/NonDecreasingSubsequences.java)|[https://leetcode.com/problems/non-decreasing-subsequences/](https://leetcode.com/problems/non-decreasing-subsequences/)|\n|[NumberOfAdjacentElementsWithSameColor](arrays/NumberOfAdjacentElementsWithSameColor.java)|[https://leetcode.com/problems/number-of-adjacent-elements-with-the-same-color/](https://leetcode.com/problems/number-of-adjacent-elements-with-the-same-color/)|\n|[NumberOfArithmeticTriplets](arrays/NumberOfArithmeticTriplets.java)|[https://leetcode.com/problems/number-of-arithmetic-triplets](https://leetcode.com/problems/number-of-arithmetic-triplets)|\n|[NumberOfFlowersInFullBloom](arrays/NumberOfFlowersInFullBloom.java)|[https://leetcode.com/problems/number-of-flowers-in-full-bloom](https://leetcode.com/problems/number-of-flowers-in-full-bloom)|\n|[NumberOfGoodPairs](arrays/NumberOfGoodPairs.java)|[https://leetcode.com/problems/number-of-good-pairs](https://leetcode.com/problems/number-of-good-pairs)|\n|[NumberOfIncreasingPathsInAGrid](arrays/NumberOfIncreasingPathsInAGrid.java)|[https://leetcode.com/problems/number-of-increasing-paths-in-a-grid](https://leetcode.com/problems/number-of-increasing-paths-in-a-grid)|\n|[NumberOfLaserBeams](arrays/NumberOfLaserBeams.java)|[https://leetcode.com/problems/number-of-laser-beams-in-a-bank](https://leetcode.com/problems/number-of-laser-beams-in-a-bank)|\n|[NumberOfLinesToWriteString](arrays/NumberOfLinesToWriteString.java)|[https://leetcode.com/problems/number-of-lines-to-write-string/](https://leetcode.com/problems/number-of-lines-to-write-string/)|\n|[NumberOfRectanglesThatCanFormTheLargestSquare](arrays/NumberOfRectanglesThatCanFormTheLargestSquare.java)|[https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/](https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/)|\n|[NumberOfSeniorCitizens](arrays/NumberOfSeniorCitizens.java)|[https://leetcode.com/problems/number-of-senior-citizens/](https://leetcode.com/problems/number-of-senior-citizens/)|\n|[NumberOfStudentsDoingHomeworkAtAGivenTime](arrays/NumberOfStudentsDoingHomeworkAtAGivenTime.java)|[https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/](https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/)|\n|[NumberOfSubmatricesThatSumToTarget](arrays/NumberOfSubmatricesThatSumToTarget.java)|[https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/](https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/)|\n|[NumberOfSubsequencesThatSatisyTheGivenSumCondition](arrays/NumberOfSubsequencesThatSatisyTheGivenSumCondition.java)|[https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition](https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition)|\n|[NumberOfWaysToDivideLongCorridor](arrays/NumberOfWaysToDivideLongCorridor.java)|[https://leetcode.com/problems/number-of-ways-to-divide-a-long-corridor/](https://leetcode.com/problems/number-of-ways-to-divide-a-long-corridor/)|\n|[NumberOfZeroFilledSubArrays](arrays/NumberOfZeroFilledSubArrays.java)|[https://leetcode.com/problems/number-of-zero-filled-subarrays/](https://leetcode.com/problems/number-of-zero-filled-subarrays/)|\n|[NumbersWithSameConsecutiveDifferences](arrays/NumbersWithSameConsecutiveDifferences.java)|[https://leetcode.com/problems/numbers-with-same-consecutive-differences](https://leetcode.com/problems/numbers-with-same-consecutive-differences)|\n|[NumFriendRequests](arrays/NumFriendRequests.java)|-|\n|[PairOfSongsWithTotalDurationDivisibleBy60](arrays/PairOfSongsWithTotalDurationDivisibleBy60.java)|[https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60/](https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60/)|\n|[PartitionArraySuchThatMaximumDifferenceIsK](arrays/PartitionArraySuchThatMaximumDifferenceIsK.java)|[https://leetcode.com/problems/partition-array-such-that-maximum-difference-is-k/description/](https://leetcode.com/problems/partition-array-such-that-maximum-difference-is-k/description/)|\n|[PeakIndexInMountainArray](arrays/PeakIndexInMountainArray.java)|[https://leetcode.com/problems/peak-index-in-a-mountain-array](https://leetcode.com/problems/peak-index-in-a-mountain-array)|\n|[Permutations](arrays/Permutations.java)|[https://leetcode.com/problems/permutations/](https://leetcode.com/problems/permutations/)|\n|[PrefixCommonArrayOf2Arrays](arrays/PrefixCommonArrayOf2Arrays.java)|[https://leetcode.com/problems/find-the-prefix-common-array-of-two-arrays](https://leetcode.com/problems/find-the-prefix-common-array-of-two-arrays)|\n|[ProductOfArrayExceptSelf](arrays/ProductOfArrayExceptSelf.java)|[https://leetcode.com/problems/product-of-array-except-self](https://leetcode.com/problems/product-of-array-except-self)|\n|[QueriesOnPermutationWithKey](arrays/QueriesOnPermutationWithKey.java)|[https://leetcode.com/problems/queries-on-a-permutation-with-key](https://leetcode.com/problems/queries-on-a-permutation-with-key)|\n|[RabbitsInForest](arrays/RabbitsInForest.java)|[https://leetcode.com/problems/rabbits-in-forest](https://leetcode.com/problems/rabbits-in-forest)|\n|[RandomizedSet](arrays/RandomizedSet.java)|[https://leetcode.com/problems/insert-delete-getrandom-o1](https://leetcode.com/problems/insert-delete-getrandom-o1)|\n|[RandomizedSetDuplicates](arrays/RandomizedSetDuplicates.java)|[https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed](https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed)|\n|[RandomPickWithBlacklist](arrays/RandomPickWithBlacklist.java)|-|\n|[RangeFrequencyQueries](arrays/RangeFrequencyQueries.java)|[https://leetcode.com/problems/range-frequency-queries/](https://leetcode.com/problems/range-frequency-queries/)|\n|[RangeSumOfSortedSubArraySums](arrays/RangeSumOfSortedSubArraySums.java)|[https://leetcode.com/problems/range-sum-of-sorted-subarray-sums](https://leetcode.com/problems/range-sum-of-sorted-subarray-sums)|\n|[RangeSumQuery](arrays/RangeSumQuery.java)|[https://leetcode.com/problems/range-sum-query-immutable](https://leetcode.com/problems/range-sum-query-immutable)|\n|[RangeSumQuery2DImmutable](arrays/RangeSumQuery2DImmutable.java)|[https://leetcode.com/problems/range-sum-query-2d-immutable/](https://leetcode.com/problems/range-sum-query-2d-immutable/)|\n|[RankTransformOfAnArray](arrays/RankTransformOfAnArray.java)|[https://leetcode.com/problems/rank-transform-of-an-array](https://leetcode.com/problems/rank-transform-of-an-array)|\n|[RearrangeArrayElementsBySign](arrays/RearrangeArrayElementsBySign.java)|[https://leetcode.com/problems/rearrange-array-elements-by-sign](https://leetcode.com/problems/rearrange-array-elements-by-sign)|\n|[ReducingDishes](arrays/ReducingDishes.java)|[https://leetcode.com/problems/reducing-dishes/](https://leetcode.com/problems/reducing-dishes/)|\n|[ReductionOperationsToMakeArrayElementsEqual](arrays/ReductionOperationsToMakeArrayElementsEqual.java)|[https://leetcode.com/problems/reduction-operations-to-make-the-array-elements-equal](https://leetcode.com/problems/reduction-operations-to-make-the-array-elements-equal)|\n|[RelativeRanks](arrays/RelativeRanks.java)|[https://leetcode.com/problems/relative-ranks](https://leetcode.com/problems/relative-ranks)|\n|[RemoveCoveredIntervals](arrays/RemoveCoveredIntervals.java)|[https://leetcode.com/problems/remove-covered-intervals/](https://leetcode.com/problems/remove-covered-intervals/)|\n|[RemoveDuplicatesFromSortedArray](arrays/RemoveDuplicatesFromSortedArray.java)|[https://leetcode.com/problems/remove-duplicates-from-sorted-array](https://leetcode.com/problems/remove-duplicates-from-sorted-array)|\n|[ReorderedPowerOf2](arrays/ReorderedPowerOf2.java)|[https://leetcode.com/problems/reordered-power-of-2](https://leetcode.com/problems/reordered-power-of-2)|\n|[ReplaceElementsInArray](arrays/ReplaceElementsInArray.java)|[https://leetcode.com/problems/replace-elements-in-an-array](https://leetcode.com/problems/replace-elements-in-an-array)|\n|[ReshapeMatrix](arrays/ReshapeMatrix.java)|-|\n|[RingsAndRods](arrays/RingsAndRods.java)|[https://leetcode.com/problems/rings-and-rods](https://leetcode.com/problems/rings-and-rods)|\n|[RLEIterator](arrays/RLEIterator.java)|[https://leetcode.com/problems/rle-iterator](https://leetcode.com/problems/rle-iterator)|\n|[RotateArray](arrays/RotateArray.java)|-|\n|[RotatedBinarySearch](arrays/RotatedBinarySearch.java)|-|\n|[RotateImage](arrays/RotateImage.java)|[https://leetcode.com/problems/rotate-image/submissions/](https://leetcode.com/problems/rotate-image/submissions/)|\n|[ScoreAfterFlippingMatrix](arrays/ScoreAfterFlippingMatrix.java)|[https://leetcode.com/problems/score-after-flipping-matrix](https://leetcode.com/problems/score-after-flipping-matrix)|\n|[ScoreOfAllPrefixesOfAnArray](arrays/ScoreOfAllPrefixesOfAnArray.java)|[https://leetcode.com/problems/find-the-score-of-all-prefixes-of-an-array/](https://leetcode.com/problems/find-the-score-of-all-prefixes-of-an-array/)|\n|[Search2DMatrix](arrays/Search2DMatrix.java)|[https://leetcode.com/problems/search-a-2d-matrix](https://leetcode.com/problems/search-a-2d-matrix)|\n|[Search2DMatrix2](arrays/Search2DMatrix2.java)|[https://leetcode.com/problems/search-a-2d-matrix-ii/](https://leetcode.com/problems/search-a-2d-matrix-ii/)|\n|[SearchInsertPosition](arrays/SearchInsertPosition.java)|[https://leetcode.com/problems/search-insert-position/](https://leetcode.com/problems/search-insert-position/)|\n|[SearchRange](arrays/SearchRange.java)|[https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)|\n|[SeparateBlackAndWhiteBalls](arrays/SeparateBlackAndWhiteBalls.java)|[https://leetcode.com/problems/separate-black-and-white-balls](https://leetcode.com/problems/separate-black-and-white-balls)|\n|[SetMatrixZeroes](arrays/SetMatrixZeroes.java)|-|\n|[SetMismatch](arrays/SetMismatch.java)|[https://leetcode.com/problems/set-mismatch](https://leetcode.com/problems/set-mismatch)|\n|[ShiftGrid](arrays/ShiftGrid.java)|-|\n|[ShortestSubarrayToBeRemovedToMakeArraySorted](arrays/ShortestSubarrayToBeRemovedToMakeArraySorted.java)|[https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted](https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted)|\n|[ShortestSubarrayWithSumAtleastK](arrays/ShortestSubarrayWithSumAtleastK.java)|[https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k](https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k)|\n|[ShuffleTheArray](arrays/ShuffleTheArray.java)|[https://leetcode.com/problems/shuffle-the-array](https://leetcode.com/problems/shuffle-the-array)|\n|[SingleNumber2](arrays/SingleNumber2.java)|[https://leetcode.com/problems/single-number-ii/](https://leetcode.com/problems/single-number-ii/)|\n|[SingleNumber3](arrays/SingleNumber3.java)|[https://leetcode.com/problems/single-number-iii/](https://leetcode.com/problems/single-number-iii/)|\n|[SmallestInfiniteSet](arrays/SmallestInfiniteSet.java)|[https://leetcode.com/problems/smallest-number-in-infinite-set](https://leetcode.com/problems/smallest-number-in-infinite-set)|\n|[SmallestRangeCoveringAllItemsFromKLists](arrays/SmallestRangeCoveringAllItemsFromKLists.java)|[https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists)|\n|[SortAnArray](arrays/SortAnArray.java)|[https://leetcode.com/problems/sort-an-array](https://leetcode.com/problems/sort-an-array)|\n|[SortByParity](arrays/SortByParity.java)|[https://leetcode.com/problems/sort-array-by-parity](https://leetcode.com/problems/sort-array-by-parity)|\n|[SortColors](arrays/SortColors.java)|[https://leetcode.com/problems/sort-colors](https://leetcode.com/problems/sort-colors)|\n|[sorting](arrays/sorting)|-|\n|[SortMatrixDiagonally](arrays/SortMatrixDiagonally.java)|[https://leetcode.com/problems/sort-the-matrix-diagonally/](https://leetcode.com/problems/sort-the-matrix-diagonally/)|\n|[SortStudentsByTheirKthScore](arrays/SortStudentsByTheirKthScore.java)|[https://leetcode.com/problems/sort-the-students-by-their-kth-score/](https://leetcode.com/problems/sort-the-students-by-their-kth-score/)|\n|[SortTheJumbledNumbers](arrays/SortTheJumbledNumbers.java)|[https://leetcode.com/problems/sort-the-jumbled-numbers/](https://leetcode.com/problems/sort-the-jumbled-numbers/)|\n|[SortThePeople.kt](arrays/SortThePeople.kt)|[https://leetcode.com/problems/sort-the-people/](https://leetcode.com/problems/sort-the-people/)|\n|[SpecialArrayWithXElementsGreaterThanOrEqualToX](arrays/SpecialArrayWithXElementsGreaterThanOrEqualToX.java)|[https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x)|\n|[SpiralMatrix](arrays/SpiralMatrix.java)|-|\n|[SpiralMatrix2](arrays/SpiralMatrix2.java)|[https://leetcode.com/problems/spiral-matrix-ii](https://leetcode.com/problems/spiral-matrix-ii)|\n|[SquaresOfASortedArray](arrays/SquaresOfASortedArray.java)|[https://leetcode.com/problems/squares-of-a-sorted-array](https://leetcode.com/problems/squares-of-a-sorted-array)|\n|[StackWithIncrement](arrays/StackWithIncrement.java)|[https://leetcode.com/problems/design-a-stack-with-increment-operation](https://leetcode.com/problems/design-a-stack-with-increment-operation)|\n|[SubarrayDistinctElementsSumOfSquares](arrays/SubarrayDistinctElementsSumOfSquares.java)|[https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-i/](https://leetcode.com/problems/subarrays-distinct-element-sum-of-squares-i/)|\n|[SubarrayProductLessThanK](arrays/SubarrayProductLessThanK.java)|[https://leetcode.com/problems/subarray-product-less-than-k/](https://leetcode.com/problems/subarray-product-less-than-k/)|\n|[SubarraySumDivisibleByK](arrays/SubarraySumDivisibleByK.java)|[https://leetcode.com/problems/subarray-sums-divisible-by-k/submissions/881384455/](https://leetcode.com/problems/subarray-sums-divisible-by-k/submissions/881384455/)|\n|[SubArraySumEqualsK](arrays/SubArraySumEqualsK.java)|[https://leetcode.com/problems/subarray-sum-equals-k](https://leetcode.com/problems/subarray-sum-equals-k)|\n|[SubarraysWithKDistinctIntegers](arrays/SubarraysWithKDistinctIntegers.java)|[https://leetcode.com/problems/subarrays-with-k-different-integers](https://leetcode.com/problems/subarrays-with-k-different-integers)|\n|[SuccessfulPairsOfSpellsAndPotions](arrays/SuccessfulPairsOfSpellsAndPotions.java)|[https://leetcode.com/problems/successful-pairs-of-spells-and-potions](https://leetcode.com/problems/successful-pairs-of-spells-and-potions)|\n|[SumAfterEvenQueries](arrays/SumAfterEvenQueries.java)|[https://leetcode.com/problems/sum-of-even-numbers-after-queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries)|\n|[SumInAMatrix](arrays/SumInAMatrix.java)|[https://leetcode.com/problems/sum-in-a-matrix/](https://leetcode.com/problems/sum-in-a-matrix/)|\n|[SummaryRanges](arrays/SummaryRanges.java)|[https://leetcode.com/problems/summary-ranges](https://leetcode.com/problems/summary-ranges)|\n|[SumOfAbsoluteDifferencesInSortedArray](arrays/SumOfAbsoluteDifferencesInSortedArray.java)|[https://leetcode.com/problems/sum-of-absolute-differences-in-a-sorted-array/](https://leetcode.com/problems/sum-of-absolute-differences-in-a-sorted-array/)|\n|[SumOfGoodNumbers](arrays/SumOfGoodNumbers.java)|[https://leetcode.com/problems/sum-of-good-numbers/](https://leetcode.com/problems/sum-of-good-numbers/)|\n|[SumOfSubarrayMinimums](arrays/SumOfSubarrayMinimums.java)|[https://leetcode.com/problems/sum-of-subarray-minimums](https://leetcode.com/problems/sum-of-subarray-minimums)|\n|[SumOfSubarrayRanges](arrays/SumOfSubarrayRanges.java)|[https://leetcode.com/problems/sum-of-subarray-ranges/](https://leetcode.com/problems/sum-of-subarray-ranges/)|\n|[TakeKOfEachCharacterFromLeftAndRight](arrays/TakeKOfEachCharacterFromLeftAndRight.java)|[https://leetcode.com/problems/take-k-of-each-character-from-left-and-right](https://leetcode.com/problems/take-k-of-each-character-from-left-and-right)|\n|[TakingMaximumEnergyFromMysticDungeon](arrays/TakingMaximumEnergyFromMysticDungeon.java)|[https://leetcode.com/problems/taking-maximum-energy-from-the-mystic-dungeon/](https://leetcode.com/problems/taking-maximum-energy-from-the-mystic-dungeon/)|\n|[TargetIndices](arrays/TargetIndices.java)|-|\n|[TeemoAttacking](arrays/TeemoAttacking.java)|[https://leetcode.com/problems/teemo-attacking](https://leetcode.com/problems/teemo-attacking)|\n|[TheNumberOfTheSmallestUnoccupiedChair](arrays/TheNumberOfTheSmallestUnoccupiedChair.java)|[https://leetcode.com/problems/the-number-of-the-smallest-unoccupied-chair](https://leetcode.com/problems/the-number-of-the-smallest-unoccupied-chair)|\n|[ThirdMax](arrays/ThirdMax.java)|[https://leetcode.com/problems/third-maximum-number](https://leetcode.com/problems/third-maximum-number)|\n|[ThreeConsecutiveOdds](arrays/ThreeConsecutiveOdds.java)|[https://leetcode.com/problems/three-consecutive-odds](https://leetcode.com/problems/three-consecutive-odds)|\n|[TimeMap](arrays/TimeMap.java)|[https://leetcode.com/problems/time-based-key-value-store/](https://leetcode.com/problems/time-based-key-value-store/)|\n|[TopKFrequentElements](arrays/TopKFrequentElements.java)|[https://leetcode.com/problems/top-k-frequent-elements](https://leetcode.com/problems/top-k-frequent-elements)|\n|[TransposeMatrix](arrays/TransposeMatrix.java)|[https://leetcode.com/problems/transpose-matrix](https://leetcode.com/problems/transpose-matrix)|\n|[TrappingRainWater](arrays/TrappingRainWater.java)|[https://leetcode.com/problems/trapping-rain-water](https://leetcode.com/problems/trapping-rain-water)|\n|[Triangle](arrays/Triangle.java)|-|\n|[TripletPermutation](arrays/TripletPermutation.java)|-|\n|[TupleWithSameProduct](arrays/TupleWithSameProduct.java)|[https://leetcode.com/problems/tuple-with-same-product](https://leetcode.com/problems/tuple-with-same-product)|\n|[TwoBestNonOverlappingIntervals](arrays/TwoBestNonOverlappingIntervals.java)|[https://leetcode.com/problems/two-best-non-overlapping-events](https://leetcode.com/problems/two-best-non-overlapping-events)|\n|[TwoOutOfThree](arrays/TwoOutOfThree.java)|[https://leetcode.com/problems/two-out-of-three/](https://leetcode.com/problems/two-out-of-three/)|\n|[UniqueNumberOfOccurences](arrays/UniqueNumberOfOccurences.java)|[https://leetcode.com/problems/unique-number-of-occurrences](https://leetcode.com/problems/unique-number-of-occurrences)|\n|[UniquePaths3](arrays/UniquePaths3.java)|-|\n|[UserActivityMinutes](arrays/UserActivityMinutes.java)|[https://leetcode.com/problems/finding-the-users-active-minutes](https://leetcode.com/problems/finding-the-users-active-minutes)|\n|[WalkingRobotSimulation](arrays/WalkingRobotSimulation.java)|[https://leetcode.com/problems/walking-robot-simulation](https://leetcode.com/problems/walking-robot-simulation)|\n|[WaysToMakeFairArray](arrays/WaysToMakeFairArray.java)|[https://leetcode.com/problems/ways-to-make-a-fair-array](https://leetcode.com/problems/ways-to-make-a-fair-array)|\n|[WinnerOfAnArrayGame](arrays/WinnerOfAnArrayGame.java)|[https://leetcode.com/problems/find-the-winner-of-an-array-game](https://leetcode.com/problems/find-the-winner-of-an-array-game)|\n|[ZeroArrayTransformation1](arrays/ZeroArrayTransformation1.java)|[https://leetcode.com/problems/zero-array-transformation-i](https://leetcode.com/problems/zero-array-transformation-i)|\n|Total|319|\n\n\n#### Backtracking\n|Solution|Leetcode Link|\n|--------|-----------|\n|[BeautifulArrangement](backtracking/BeautifulArrangement.java)|[https://leetcode.com/problems/beautiful-arrangement/](https://leetcode.com/problems/beautiful-arrangement/)|\n|[ClosestDessertCost](backtracking/ClosestDessertCost.java)|[https://leetcode.com/problems/closest-dessert-cost](https://leetcode.com/problems/closest-dessert-cost)|\n|[Combinations](backtracking/Combinations.java)|[https://leetcode.com/problems/combinations](https://leetcode.com/problems/combinations)|\n|[FairDistributionOfCookies](backtracking/FairDistributionOfCookies.java)|[https://leetcode.com/problems/fair-distribution-of-cookies](https://leetcode.com/problems/fair-distribution-of-cookies)|\n|[GenerateBinaryStringsWithoutAdjacentZeroes](backtracking/GenerateBinaryStringsWithoutAdjacentZeroes.java)|[https://leetcode.com/problems/generate-binary-strings-without-adjacent-zeros](https://leetcode.com/problems/generate-binary-strings-without-adjacent-zeros)|\n|[GrayCode](backtracking/GrayCode.java)|[https://leetcode.com/problems/gray-code/](https://leetcode.com/problems/gray-code/)|\n|[LetterCombinationOfPhoneNumber](backtracking/LetterCombinationOfPhoneNumber.java)|[https://leetcode.com/problems/letter-combinations-of-a-phone-number](https://leetcode.com/problems/letter-combinations-of-a-phone-number)|\n|[MaximizeScoreAfterNOperations](backtracking/MaximizeScoreAfterNOperations.java)|[https://leetcode.com/problems/maximize-score-after-n-operations](https://leetcode.com/problems/maximize-score-after-n-operations)|\n|[MaximumCompatibilityScoreSum](backtracking/MaximumCompatibilityScoreSum.java)|[https://leetcode.com/problems/maximum-compatibility-score-sum](https://leetcode.com/problems/maximum-compatibility-score-sum)|\n|[MaximumLengthOfConcatenatedStringWithUniqueCharacters](backtracking/MaximumLengthOfConcatenatedStringWithUniqueCharacters.java)|[https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters](https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters)|\n|[MaximumNumberOfAchievableTransferRequests](backtracking/MaximumNumberOfAchievableTransferRequests.java)|[https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests](https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests)|\n|[MaximumScoreWordsFormedByLetters](backtracking/MaximumScoreWordsFormedByLetters.java)|[https://leetcode.com/problems/maximum-score-words-formed-by-letters](https://leetcode.com/problems/maximum-score-words-formed-by-letters)|\n|[NQueens](backtracking/NQueens.java)|[https://leetcode.com/problems/n-queens](https://leetcode.com/problems/n-queens)|\n|[NQueens2](backtracking/NQueens2.java)|[https://leetcode.com/problems/n-queens-ii](https://leetcode.com/problems/n-queens-ii)|\n|[SplitAStringIntoMaxNumberOfUniqueSubstrings](backtracking/SplitAStringIntoMaxNumberOfUniqueSubstrings.java)|[https://leetcode.com/problems/split-a-string-into-the-max-number-of-unique-substrings](https://leetcode.com/problems/split-a-string-into-the-max-number-of-unique-substrings)|\n|[Subsets](backtracking/Subsets.java)|[https://leetcode.com/problems/subsets/](https://leetcode.com/problems/subsets/)|\n|[Subsets2](backtracking/Subsets2.java)|[https://leetcode.com/problems/subsets-ii](https://leetcode.com/problems/subsets-ii)|\n|Total|17|\n\n\n#### Bit Manipulation\n|Solution|Leetcode Link|\n|--------|-----------|\n|[Bitset](bit_manipulation/Bitset.java)|[https://leetcode.com/problems/design-bitset](https://leetcode.com/problems/design-bitset)|\n|[BitwiseAndOfNumberRange](bit_manipulation/BitwiseAndOfNumberRange.java)|[https://leetcode.com/problems/bitwise-and-of-numbers-range](https://leetcode.com/problems/bitwise-and-of-numbers-range)|\n|[ChalkboardXORGame](bit_manipulation/ChalkboardXORGame.java)|[https://leetcode.com/problems/chalkboard-xor-game](https://leetcode.com/problems/chalkboard-xor-game)|\n|[CountBits](bit_manipulation/CountBits.java)|[https://leetcode.com/problems/counting-bits](https://leetcode.com/problems/counting-bits)|\n|[CountNumberOfMaximumORBitwiseSubsets](bit_manipulation/CountNumberOfMaximumORBitwiseSubsets.java)|[https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets/](https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets/)|\n|[FindKthBitInNthBinaryString](bit_manipulation/FindKthBitInNthBinaryString.java)|[https://leetcode.com/problems/find-kth-bit-in-nth-binary-string](https://leetcode.com/problems/find-kth-bit-in-nth-binary-string)|\n|[FindTheLongestSubstringWithVowelsInEvenCounts](bit_manipulation/FindTheLongestSubstringWithVowelsInEvenCounts.java)|[https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts](https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts)|\n|[FindTheXOROfNumbersThatAppearTwice](bit_manipulation/FindTheXOROfNumbersThatAppearTwice.java)|[https://leetcode.com/problems/find-the-xor-of-numbers-which-appear-twice/](https://leetcode.com/problems/find-the-xor-of-numbers-which-appear-twice/)|\n|[LargestCombinationWithBitwiseANDGreaterThanZero](bit_manipulation/LargestCombinationWithBitwiseANDGreaterThanZero.java)|[https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero/](https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero/)|\n|[LongestSubarrayWithMaximumBitwiseAND](bit_manipulation/LongestSubarrayWithMaximumBitwiseAND.java)|[https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and/](https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and/)|\n|[MaximumXORForEachQuery](bit_manipulation/MaximumXORForEachQuery.java)|[https://leetcode.com/problems/maximum-xor-for-each-query/](https://leetcode.com/problems/maximum-xor-for-each-query/)|\n|[MinimizeXOR](bit_manipulation/MinimizeXOR.java)|[https://leetcode.com/problems/minimize-xor](https://leetcode.com/problems/minimize-xor)|\n|[MinimumArrayEnd](bit_manipulation/MinimumArrayEnd.java)|[https://leetcode.com/problems/minimum-array-end](https://leetcode.com/problems/minimum-array-end)|\n|[MinimumFlipsToMakeAOrBEqualToC](bit_manipulation/MinimumFlipsToMakeAOrBEqualToC.java)|[https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/](https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/)|\n|[ReverseBits](bit_manipulation/ReverseBits.java)|[https://leetcode.com/problems/reverse-bits](https://leetcode.com/problems/reverse-bits)|\n|[ShortestSubarrayWithORAtleastK1](bit_manipulation/ShortestSubarrayWithORAtleastK1.java)|[https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-i](https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-i)|\n|[ShortestSubarrayWithORAtleastK2](bit_manipulation/ShortestSubarrayWithORAtleastK2.java)|[https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii](https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii)|\n|[SumOfAllSubsetXORTotals](bit_manipulation/SumOfAllSubsetXORTotals.java)|[https://leetcode.com/problems/sum-of-all-subset-xor-totals](https://leetcode.com/problems/sum-of-all-subset-xor-totals)|\n|[XORQueriesOfSubarray](bit_manipulation/XORQueriesOfSubarray.java)|[https://leetcode.com/problems/xor-queries-of-a-subarray/](https://leetcode.com/problems/xor-queries-of-a-subarray/)|\n|Total|19|\n\n\n#### Concurrency\n|Solution|Leetcode Link|\n|--------|-----------|\n|[PrintInOrder](concurrency/PrintInOrder.java)|[https://leetcode.com/problems/print-in-order](https://leetcode.com/problems/print-in-order)|\n|Total|1|\n\n\n#### Design\n|Solution|Leetcode Link|\n|--------|-----------|\n|[ApplyDesignEveryNOrders](design/ApplyDesignEveryNOrders.java)|[https://leetcode.com/problems/apply-discount-every-n-orders](https://leetcode.com/problems/apply-discount-every-n-orders)|\n|[DesignAnOrderedStream](design/DesignAnOrderedStream.java)|[https://leetcode.com/problems/design-an-ordered-stream/](https://leetcode.com/problems/design-an-ordered-stream/)|\n|[DesignFacebook](design/DesignFacebook.java)|-|\n|[DesignMemoryAllocator](design/DesignMemoryAllocator.java)|[https://leetcode.com/problems/design-memory-allocator](https://leetcode.com/problems/design-memory-allocator)|\n|[DesignParkingSystem](design/DesignParkingSystem.java)|[https://leetcode.com/problems/design-parking-system](https://leetcode.com/problems/design-parking-system)|\n|[DesignSpreadsheet](design/DesignSpreadsheet.java)|[https://leetcode.com/problems/design-spreadsheet](https://leetcode.com/problems/design-spreadsheet)|\n|[DesignUndergroundSystem](design/DesignUndergroundSystem.java)|[https://leetcode.com/problems/design-underground-system](https://leetcode.com/problems/design-underground-system)|\n|[FrequencyTracker](design/FrequencyTracker.java)|[https://leetcode.com/problems/frequency-tracker](https://leetcode.com/problems/frequency-tracker)|\n|[ImplementRouter.kt](design/ImplementRouter.kt)|[https://leetcode.com/problems/implement-router/](https://leetcode.com/problems/implement-router/)|\n|[IteratorForCombination](design/IteratorForCombination.java)|[https://leetcode.com/problems/iterator-for-combination](https://leetcode.com/problems/iterator-for-combination)|\n|[LongestUploadedPrefix](design/LongestUploadedPrefix.java)|[https://leetcode.com/problems/longest-uploaded-prefix](https://leetcode.com/problems/longest-uploaded-prefix)|\n|Total|11|\n\n\n#### Dp\n|Solution|Leetcode Link|\n|--------|-----------|\n|[AllPossibleFBT](dp/AllPossibleFBT.java)|-|\n|[ArithmeticSlices](dp/ArithmeticSlices.java)|[https://leetcode.com/problems/arithmetic-slices/](https://leetcode.com/problems/arithmetic-slices/)|\n|[ArithmeticSlices2](dp/ArithmeticSlices2.java)|[https://leetcode.com/problems/arithmetic-slices-ii-subsequence](https://leetcode.com/problems/arithmetic-slices-ii-subsequence)|\n|[BestTimeToBuyAndSellStockWithCooldown](dp/BestTimeToBuyAndSellStockWithCooldown.java)|[https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown)|\n|[BestTimeToBuyAndSellStockWIthTransactionFee](dp/BestTimeToBuyAndSellStockWIthTransactionFee.java)|[https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee)|\n|[BuildArrayWhereYouCanFindTheMaximumExactlyKComparisons](dp/BuildArrayWhereYouCanFindTheMaximumExactlyKComparisons.java)|[https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons](https://leetcode.com/problems/build-array-where-you-can-find-the-maximum-exactly-k-comparisons)|\n|[ChampagneTower](dp/ChampagneTower.java)|[https://leetcode.com/problems/champagne-tower](https://leetcode.com/problems/champagne-tower)|\n|[CheapestFlightsWithinKStops](dp/CheapestFlightsWithinKStops.java)|[https://leetcode.com/problems/cheapest-flights-within-k-stops](https://leetcode.com/problems/cheapest-flights-within-k-stops)|\n|[CherryPickup2](dp/CherryPickup2.java)|-|\n|[ClimbingStairs](dp/ClimbingStairs.java)|[https://leetcode.com/problems/climbing-stairs](https://leetcode.com/problems/climbing-stairs)|\n|[CoinChange](dp/CoinChange.java)|-|\n|[CoinChange2](dp/CoinChange2.java)|-|\n|[CombinationSum4](dp/CombinationSum4.java)|[https://leetcode.com/problems/combination-sum-iv](https://leetcode.com/problems/combination-sum-iv)|\n|[CounSubstringsThatDifferByOne](dp/CounSubstringsThatDifferByOne.java)|[https://leetcode.com/problems/count-substrings-that-differ-by-one-character](https://leetcode.com/problems/count-substrings-that-differ-by-one-character)|\n|[CountAllPossibleRoutes](dp/CountAllPossibleRoutes.java)|[https://leetcode.com/problems/count-all-possible-routes](https://leetcode.com/problems/count-all-possible-routes)|\n|[CountingBits](dp/CountingBits.java)|-|\n|[CountNumberOfSpecialSubsequences](dp/CountNumberOfSpecialSubsequences.java)|[https://leetcode.com/problems/count-number-of-special-subsequences](https://leetcode.com/problems/count-number-of-special-subsequences)|\n|[CountNumbersWithUniqueDigits](dp/CountNumbersWithUniqueDigits.java)|[https://leetcode.com/problems/count-numbers-with-unique-digits](https://leetcode.com/problems/count-numbers-with-unique-digits)|\n|[CountOfIntegers](dp/CountOfIntegers.java)|-|\n|[CountSpecialIntegers](dp/CountSpecialIntegers.java)|[https://leetcode.com/problems/count-special-integers](https://leetcode.com/problems/count-special-integers)|\n|[CountSubmatricesWithAllOnes](dp/CountSubmatricesWithAllOnes.java)|[https://leetcode.com/problems/count-square-submatrices-with-all-ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones)|\n|[CountTheNumberOfPowerfulIntegers](dp/CountTheNumberOfPowerfulIntegers.java)|[https://leetcode.com/problems/count-the-number-of-powerful-integers](https://leetcode.com/problems/count-the-number-of-powerful-integers)|\n|[CountVowelStrings](dp/CountVowelStrings.java)|-|\n|[CountWaysToBuildGoodStrings](dp/CountWaysToBuildGoodStrings.java)|[https://leetcode.com/problems/count-ways-to-build-good-strings](https://leetcode.com/problems/count-ways-to-build-good-strings)|\n|[DecodeWays](dp/DecodeWays.java)|[https://leetcode.com/problems/decode-ways](https://leetcode.com/problems/decode-ways)|\n|[ExtraCharactersInAString](dp/ExtraCharactersInAString.java)|[https://leetcode.com/problems/extra-characters-in-a-string](https://leetcode.com/problems/extra-characters-in-a-string)|\n|[FindMaxInGeneratedArray](dp/FindMaxInGeneratedArray.java)|-|\n|[FindTheMaximumLengthOfGoodSubsequence1](dp/FindTheMaximumLengthOfGoodSubsequence1.java)|[https://leetcode.com/problems/find-the-maximum-length-of-a-good-subsequence-i/](https://leetcode.com/problems/find-the-maximum-length-of-a-good-subsequence-i/)|\n|[FindTheMaximumLengthOfValidSubsequence1](dp/FindTheMaximumLengthOfValidSubsequence1.java)|[https://leetcode.com/problems/find-the-maximum-length-of-valid-subsequence-i/](https://leetcode.com/problems/find-the-maximum-length-of-valid-subsequence-i/)|\n|[FreedomTrail](dp/FreedomTrail.java)|[https://leetcode.com/problems/freedom-trail](https://leetcode.com/problems/freedom-trail)|\n|[FrogJump](dp/FrogJump.java)|[https://leetcode.com/problems/frog-jump](https://leetcode.com/problems/frog-jump)|\n|[HouseRobber](dp/HouseRobber.java)|[https://leetcode.com/problems/house-robber](https://leetcode.com/problems/house-robber)|\n|[HouseRobberCircular](dp/HouseRobberCircular.java)|[https://leetcode.com/problems/house-robber-ii](https://leetcode.com/problems/house-robber-ii)|\n|[HouseRobberIII](dp/HouseRobberIII.java)|[https://leetcode.com/problems/house-robber-iii](https://leetcode.com/problems/house-robber-iii)|\n|[IntegerBreak](dp/IntegerBreak.java)|-|\n|[InterleavingString](dp/InterleavingString.java)|[https://leetcode.com/problems/interleaving-string](https://leetcode.com/problems/interleaving-string)|\n|[JumpGame](dp/JumpGame.java)|-|\n|[JumpGame2](dp/JumpGame2.java)|-|\n|[KInversePairsArray](dp/KInversePairsArray.java)|[https://leetcode.com/problems/k-inverse-pairs-array/submissions](https://leetcode.com/problems/k-inverse-pairs-array/submissions)|\n|[KnightDialer](dp/KnightDialer.java)|[https://leetcode.com/problems/knight-dialer/](https://leetcode.com/problems/knight-dialer/)|\n|[LargestDivisibleSubset](dp/LargestDivisibleSubset.java)|[https://leetcode.com/problems/largest-divisible-subset](https://leetcode.com/problems/largest-divisible-subset)|\n|[LargestSumOfAverages](dp/LargestSumOfAverages.java)|[https://leetcode.com/problems/largest-sum-of-averages](https://leetcode.com/problems/largest-sum-of-averages)|\n|[LongestCommonSubequence](dp/LongestCommonSubequence.java)|[https://leetcode.com/problems/longest-common-subsequence](https://leetcode.com/problems/longest-common-subsequence)|\n|[LongestIdealSubsequence](dp/LongestIdealSubsequence.java)|[https://leetcode.com/problems/longest-ideal-subsequence](https://leetcode.com/problems/longest-ideal-subsequence)|\n|[LongestIncreasingPathInAMatrix](dp/LongestIncreasingPathInAMatrix.java)|[https://leetcode.com/problems/longest-increasing-path-in-a-matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix)|\n|[LongestIncreasingSubsequence](dp/LongestIncreasingSubsequence.java)|[https://leetcode.com/problems/longest-increasing-subsequence](https://leetcode.com/problems/longest-increasing-subsequence)|\n|[LongestPalindromicSubsequence](dp/LongestPalindromicSubsequence.java)|[https://leetcode.com/problems/longest-palindromic-subsequence](https://leetcode.com/problems/longest-palindromic-subsequence)|\n|[LongestStringChain](dp/LongestStringChain.java)|[https://leetcode.com/problems/longest-string-chain](https://leetcode.com/problems/longest-string-chain)|\n|[MaxEnergyBoostFrom2Drinks](dp/MaxEnergyBoostFrom2Drinks.java)|[https://leetcode.com/problems/maximum-energy-boost-from-two-drinks/](https://leetcode.com/problems/maximum-energy-boost-from-two-drinks/)|\n|[MaximalSquare](dp/MaximalSquare.java)|[https://leetcode.com/problems/maximal-square/](https://leetcode.com/problems/maximal-square/)|\n|[MaximumAbsoluteSumOfAnySubarray](dp/MaximumAbsoluteSumOfAnySubarray.java)|[https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray/](https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray/)|\n|[MaximumDotProductOf2Subsequences](dp/MaximumDotProductOf2Subsequences.java)|[https://leetcode.com/problems/max-dot-product-of-two-subsequences](https://leetcode.com/problems/max-dot-product-of-two-subsequences)|\n|[MaximumEarningsFromTaxi](dp/MaximumEarningsFromTaxi.java)|[https://leetcode.com/problems/maximum-earnings-from-taxi](https://leetcode.com/problems/maximum-earnings-from-taxi)|\n|[MaximumMultiplicationScore](dp/MaximumMultiplicationScore.java)|[https://leetcode.com/problems/maximum-multiplication-score](https://leetcode.com/problems/maximum-multiplication-score)|\n|[MaximumNumberOfJumpsToReachTheLastIndex](dp/MaximumNumberOfJumpsToReachTheLastIndex.java)|[https://leetcode.com/problems/maximum-number-of-jumps-to-reach-the-last-index](https://leetcode.com/problems/maximum-number-of-jumps-to-reach-the-last-index)|\n|[MaximumNumberOfMovesInAGrid](dp/MaximumNumberOfMovesInAGrid.java)|[https://leetcode.com/problems/maximum-number-of-moves-in-a-grid](https://leetcode.com/problems/maximum-number-of-moves-in-a-grid)|\n|[MaximumProductSubarray](dp/MaximumProductSubarray.java)|-|\n|[MaximumProfitInJobScheduling](dp/MaximumProfitInJobScheduling.java)|[https://leetcode.com/problems/maximum-profit-in-job-scheduling](https://leetcode.com/problems/maximum-profit-in-job-scheduling)|\n|[MaximumSumCircularSubArray](dp/MaximumSumCircularSubArray.java)|[https://leetcode.com/problems/maximum-sum-circular-subarray/](https://leetcode.com/problems/maximum-sum-circular-subarray/)|\n|[MaximumValueOfKCoinsFromPiles](dp/MaximumValueOfKCoinsFromPiles.java)|[https://leetcode.com/problems/maximum-value-of-k-coins-from-piles](https://leetcode.com/problems/maximum-value-of-k-coins-from-piles)|\n|[MinCostClimbingStairs](dp/MinCostClimbingStairs.java)|[https://leetcode.com/problems/min-cost-climbing-stairs](https://leetcode.com/problems/min-cost-climbing-stairs)|\n|[MinimumCostForTickets](dp/MinimumCostForTickets.java)|[https://leetcode.com/problems/minimum-cost-for-tickets/](https://leetcode.com/problems/minimum-cost-for-tickets/)|\n|[MinimumCostToCutAStick](dp/MinimumCostToCutAStick.java)|[https://leetcode.com/problems/minimum-cost-to-cut-a-stick/](https://leetcode.com/problems/minimum-cost-to-cut-a-stick/)|\n|[MinimumFallingPathSum](dp/MinimumFallingPathSum.java)|[https://leetcode.com/problems/minimum-falling-path-sum](https://leetcode.com/problems/minimum-falling-path-sum)|\n|[MinimumFallingPathSum2](dp/MinimumFallingPathSum2.java)|[https://leetcode.com/problems/minimum-falling-path-sum-ii](https://leetcode.com/problems/minimum-falling-path-sum-ii)|\n|[MinimumInsertionStepsToMakeStringPalindrome](dp/MinimumInsertionStepsToMakeStringPalindrome.java)|[https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome](https://leetcode.com/problems/minimum-insertion-steps-to-make-a-string-palindrome)|\n|[MinimumNumberOfDaysToEatNOranges](dp/MinimumNumberOfDaysToEatNOranges.java)|[https://leetcode.com/problems/minimum-number-of-days-to-eat-n-oranges](https://leetcode.com/problems/minimum-number-of-days-to-eat-n-oranges)|\n|[MinimumNumberOfRemovalsToMakeMountainArray](dp/MinimumNumberOfRemovalsToMakeMountainArray.java)|[https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array](https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array)|\n|[MinimumTimeToMakeRopeColorful](dp/MinimumTimeToMakeRopeColorful.java)|[https://leetcode.com/problems/minimum-time-to-make-rope-colorful](https://leetcode.com/problems/minimum-time-to-make-rope-colorful)|\n|[MinimumTotalDistanceTravelled](dp/MinimumTotalDistanceTravelled.java)|[https://leetcode.com/problems/minimum-total-distance-traveled](https://leetcode.com/problems/minimum-total-distance-traveled)|\n|[MinPathSum](dp/MinPathSum.java)|[https://leetcode.com/problems/minimum-path-sum/](https://leetcode.com/problems/minimum-path-sum/)|\n|[MinSteps](dp/MinSteps.java)|[https://leetcode.com/problems/2-keys-keyboard/](https://leetcode.com/problems/2-keys-keyboard/)|\n|[NonNegativeIntegersWithoutConsecutiveOnes](dp/NonNegativeIntegersWithoutConsecutiveOnes.java)|[https://leetcode.com/problems/non-negative-integers-without-consecutive-ones](https://leetcode.com/problems/non-negative-integers-without-consecutive-ones)|\n|[NumberOfArithmeticSlices](dp/NumberOfArithmeticSlices.java)|[https://leetcode.com/problems/arithmetic-slices/](https://leetcode.com/problems/arithmetic-slices/)|\n|[NumberOfBeautifulIntegersInRange](dp/NumberOfBeautifulIntegersInRange.java)|[https://leetcode.com/problems/number-of-beautiful-integers-in-the-range/](https://leetcode.com/problems/number-of-beautiful-integers-in-the-range/)|\n|[NumberOfDigitOne](dp/NumberOfDigitOne.java)|[https://leetcode.com/problems/number-of-digit-one/](https://leetcode.com/problems/number-of-digit-one/)|\n|[NumberOfWaysToFormATargetStringGivenADictionary](dp/NumberOfWaysToFormATargetStringGivenADictionary.java)|[https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary](https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary)|\n|[NumberOfWaysToSelectBuildings](dp/NumberOfWaysToSelectBuildings.java)|[https://leetcode.com/problems/number-of-ways-to-select-buildings](https://leetcode.com/problems/number-of-ways-to-select-buildings)|\n|[NumberOfWaysToStayInSamePlaceAfterSomeSteps](dp/NumberOfWaysToStayInSamePlaceAfterSomeSteps.java)|[https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps](https://leetcode.com/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps)|\n|[NumbersAtMostNGivenDigitSet](dp/NumbersAtMostNGivenDigitSet.java)|[https://leetcode.com/problems/numbers-at-most-n-given-digit-set](https://leetcode.com/problems/numbers-at-most-n-given-digit-set)|\n|[NumbersWithRepeatedDigits](dp/NumbersWithRepeatedDigits.java)|[https://leetcode.com/problems/numbers-with-repeated-digits](https://leetcode.com/problems/numbers-with-repeated-digits)|\n|[NumOfTeams](dp/NumOfTeams.java)|[https://leetcode.com/problems/count-number-of-teams](https://leetcode.com/problems/count-number-of-teams)|\n|[OnesAndZeroes](dp/OnesAndZeroes.java)|[https://leetcode.com/problems/ones-and-zeroes/](https://leetcode.com/problems/ones-and-zeroes/)|\n|[OutOfBoundaryPaths](dp/OutOfBoundaryPaths.java)|[https://leetcode.com/problems/out-of-boundary-paths/](https://leetcode.com/problems/out-of-boundary-paths/)|\n|[PaintingAGridWith3DifferentColors](dp/PaintingAGridWith3DifferentColors.java)|[https://leetcode.com/problems/painting-a-grid-with-three-different-colors/](https://leetcode.com/problems/painting-a-grid-with-three-different-colors/)|\n|[PartitionArrayForMaximumSum](dp/PartitionArrayForMaximumSum.java)|[https://leetcode.com/problems/partition-array-for-maximum-sum](https://leetcode.com/problems/partition-array-for-maximum-sum)|\n|[PartitionEqualSubsetSum](dp/PartitionEqualSubsetSum.java)|[https://leetcode.com/problems/partition-equal-subset-sum](https://leetcode.com/problems/partition-equal-subset-sum)|\n|[PathsInMatrixWhoseSumIsDivisibleByK](dp/PathsInMatrixWhoseSumIsDivisibleByK.java)|[https://leetcode.com/problems/paths-in-matrix-whose-sum-is-divisible-by-k/](https://leetcode.com/problems/paths-in-matrix-whose-sum-is-divisible-by-k/)|\n|[ProfitableSchemes](dp/ProfitableSchemes.java)|[https://leetcode.com/problems/profitable-schemes](https://leetcode.com/problems/profitable-schemes)|\n|[RestoreTheArray](dp/RestoreTheArray.java)|[https://leetcode.com/problems/restore-the-array](https://leetcode.com/problems/restore-the-array)|\n|[SolvingQuestionsWithBrainPower](dp/SolvingQuestionsWithBrainPower.java)|[https://leetcode.com/problems/solving-questions-with-brainpower/](https://leetcode.com/problems/solving-questions-with-brainpower/)|\n|[StoneGame](dp/StoneGame.java)|[https://leetcode.com/problems/stone-game/](https://leetcode.com/problems/stone-game/)|\n|[StoneGame2](dp/StoneGame2.java)|[https://leetcode.com/problems/stone-game-ii/](https://leetcode.com/problems/stone-game-ii/)|\n|[StoneGame3](dp/StoneGame3.java)|[https://leetcode.com/problems/stone-game-iii](https://leetcode.com/problems/stone-game-iii)|\n|[StrangePrinter](dp/StrangePrinter.java)|[https://leetcode.com/problems/strange-printer/](https://leetcode.com/problems/strange-printer/)|\n|[StudentAttendanceRecord2](dp/StudentAttendanceRecord2.java)|[https://leetcode.com/problems/student-attendance-record-ii/](https://leetcode.com/problems/student-attendance-record-ii/)|\n|[TargetSum](dp/TargetSum.java)|[https://leetcode.com/problems/target-sum/](https://leetcode.com/problems/target-sum/)|\n|[Triangle](dp/Triangle.java)|[https://leetcode.com/problems/triangle](https://leetcode.com/problems/triangle)|\n|[UncrossedLines](dp/UncrossedLines.java)|[https://leetcode.com/problems/uncrossed-lines](https://leetcode.com/problems/uncrossed-lines)|\n|[UniquePaths](dp/UniquePaths.java)|[https://leetcode.com/problems/unique-paths/](https://leetcode.com/problems/unique-paths/)|\n|[UniquePaths2](dp/UniquePaths2.java)|[https://leetcode.com/problems/unique-paths-ii](https://leetcode.com/problems/unique-paths-ii)|\n|[WiggleSubsequence](dp/WiggleSubsequence.java)|[https://leetcode.com/problems/wiggle-subsequence](https://leetcode.com/problems/wiggle-subsequence)|\n|Total|102|\n\n\n#### Graph\n|Solution|Leetcode Link|\n|--------|-----------|\n|[AllAncestorsOfNodesInDAG](graph/AllAncestorsOfNodesInDAG.java)|[https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph](https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph)|\n|[AllOne](graph/AllOne.java)|[https://leetcode.com/problems/all-oone-data-structure](https://leetcode.com/problems/all-oone-data-structure)|\n|[AllPathsFromSourceToTarget](graph/AllPathsFromSourceToTarget.java)|[https://leetcode.com/problems/all-paths-from-source-to-target](https://leetcode.com/problems/all-paths-from-source-to-target)|\n|[BuildAMatrixWithConditions](graph/BuildAMatrixWithConditions.java)|[https://leetcode.com/problems/build-a-matrix-with-conditions/](https://leetcode.com/problems/build-a-matrix-with-conditions/)|\n|[CenterOfStarGraph](graph/CenterOfStarGraph.java)|[https://leetcode.com/problems/find-center-of-star-graph](https://leetcode.com/problems/find-center-of-star-graph)|\n|[CloneGraph](graph/CloneGraph.java)|[https://leetcode.com/problems/clone-graph](https://leetcode.com/problems/clone-graph)|\n|[CourseSchedule](graph/CourseSchedule.java)|[https://leetcode.com/problems/course-schedule](https://leetcode.com/problems/course-schedule)|\n|[CourseSchedule2](graph/CourseSchedule2.java)|[https://leetcode.com/problems/course-schedule-ii](https://leetcode.com/problems/course-schedule-ii)|\n|[CourseSchedule4](graph/CourseSchedule4.java)|[https://leetcode.com/problems/course-schedule-iv](https://leetcode.com/problems/course-schedule-iv)|\n|[DetonateMaximumBombs](graph/DetonateMaximumBombs.java)|[https://leetcode.com/problems/detonate-the-maximum-bombs](https://leetcode.com/problems/detonate-the-maximum-bombs)|\n|[EvaluateDivision](graph/EvaluateDivision.java)|[https://leetcode.com/problems/evaluate-division](https://leetcode.com/problems/evaluate-division)|\n|[FindAllGroupsOfFarmland](graph/FindAllGroupsOfFarmland.java)|[https://leetcode.com/problems/find-all-groups-of-farmland](https://leetcode.com/problems/find-all-groups-of-farmland)|\n|[FindClosestNodeTo2Nodes](graph/FindClosestNodeTo2Nodes.java)|[https://leetcode.com/problems/find-closest-node-to-given-two-nodes/](https://leetcode.com/problems/find-closest-node-to-given-two-nodes/)|\n|[FindIfPathExistsInGraph](graph/FindIfPathExistsInGraph.java)|[https://leetcode.com/problems/find-if-path-exists-in-graph/](https://leetcode.com/problems/find-if-path-exists-in-graph/)|\n|[FindTheTownJudge](graph/FindTheTownJudge.java)|[https://leetcode.com/problems/find-the-town-judge](https://leetcode.com/problems/find-the-town-judge)|\n|[FlowerPlanting](graph/FlowerPlanting.java)|[https://leetcode.com/problems/flower-planting-with-no-adjacent](https://leetcode.com/problems/flower-planting-with-no-adjacent)|\n|[HasValidPath](graph/HasValidPath.java)|[https://leetcode.com/problems/find-if-path-exists-in-graph](https://leetcode.com/problems/find-if-path-exists-in-graph)|\n|[IsBipartite](graph/IsBipartite.java)|[https://leetcode.com/problems/is-graph-bipartite](https://leetcode.com/problems/is-graph-bipartite)|\n|[IslandPerimeter](graph/IslandPerimeter.java)|[https://leetcode.com/problems/island-perimeter](https://leetcode.com/problems/island-perimeter)|\n|[KeysAndRooms](graph/KeysAndRooms.java)|[https://leetcode.com/problems/keys-and-rooms](https://leetcode.com/problems/keys-and-rooms)|\n|[LargestColorValueInADirectedGraph](graph/LargestColorValueInADirectedGraph.java)|[https://leetcode.com/problems/largest-color-value-in-a-directed-graph](https://leetcode.com/problems/largest-color-value-in-a-directed-graph)|\n|[LongestCycleInAGraph](graph/LongestCycleInAGraph.java)|[https://leetcode.com/problems/longest-cycle-in-a-graph/](https://leetcode.com/problems/longest-cycle-in-a-graph/)|\n|[LongestPathWithDifferentAdjacentCharacters](graph/LongestPathWithDifferentAdjacentCharacters.java)|[https://leetcode.com/problems/longest-path-with-different-adjacent-characters/](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/)|\n|[LoudAndRich](graph/LoudAndRich.java)|[https://leetcode.com/problems/loud-and-rich](https://leetcode.com/problems/loud-and-rich)|\n|[MaximalNetworkRank](graph/MaximalNetworkRank.java)|[https://leetcode.com/problems/maximal-network-rank/](https://leetcode.com/problems/maximal-network-rank/)|\n|[MaximumNumberOfFishesInGrid](graph/MaximumNumberOfFishesInGrid.java)|[https://leetcode.com/problems/maximum-number-of-fish-in-a-grid](https://leetcode.com/problems/maximum-number-of-fish-in-a-grid)|\n|[MaxTotalImportanceOfRoads](graph/MaxTotalImportanceOfRoads.java)|[https://leetcode.com/problems/maximum-total-importance-of-roads](https://leetcode.com/problems/maximum-total-importance-of-roads)|\n|[MinimumGeneticMutation](graph/MinimumGeneticMutation.java)|[https://leetcode.com/problems/minimum-genetic-mutation](https://leetcode.com/problems/minimum-genetic-mutation)|\n|[MinimumNoVerticesToReachAllNodes](graph/MinimumNoVerticesToReachAllNodes.java)|[https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/](https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/)|\n|[MinimumObstacleRemovalToReachCorner](graph/MinimumObstacleRemovalToReachCorner.java)|[https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner](https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner)|\n|[MinimumTimeToCollectAllApples](graph/MinimumTimeToCollectAllApples.java)|[https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree/](https://leetcode.com/problems/minimum-time-to-collect-all-apples-in-a-tree/)|\n|[MinimumTimeToVisitACellInAGrid](graph/MinimumTimeToVisitACellInAGrid.java)|[https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid](https://leetcode.com/problems/minimum-time-to-visit-a-cell-in-a-grid)|\n|[NumberOfNodesInSubtreeWithSameLabels](graph/NumberOfNodesInSubtreeWithSameLabels.java)|[https://leetcode.com/problems/number-of-nodes-in-the-sub-tree-with-the-same-label/](https://leetcode.com/problems/number-of-nodes-in-the-sub-tree-with-the-same-label/)|\n|[PathWithMaximumProbability](graph/PathWithMaximumProbability.java)|[https://leetcode.com/problems/path-with-maximum-probability](https://leetcode.com/problems/path-with-maximum-probability)|\n|[PathWithMinimumEffort](graph/PathWithMinimumEffort.java)|[https://leetcode.com/problems/path-with-minimum-effort](https://leetcode.com/problems/path-with-minimum-effort)|\n|[ReconstructItinerary](graph/ReconstructItinerary.java)|[https://leetcode.com/problems/reconstruct-itinerary](https://leetcode.com/problems/reconstruct-itinerary)|\n|[RedundantConnections](graph/RedundantConnections.java)|[https://leetcode.com/problems/redundant-connection](https://leetcode.com/problems/redundant-connection)|\n|[RegionsCutBySlashes](graph/RegionsCutBySlashes.java)|[https://leetcode.com/problems/regions-cut-by-slashes](https://leetcode.com/problems/regions-cut-by-slashes)|\n|[ReorderRoutes](graph/ReorderRoutes.java)|[https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/](https://leetcode.com/problems/reorder-routes-to-make-all-paths-lead-to-the-city-zero/)|\n|[RestoreTheArrayFromAdjacentPairs](graph/RestoreTheArrayFromAdjacentPairs.java)|[https://leetcode.com/problems/restore-the-array-from-adjacent-pairs/](https://leetcode.com/problems/restore-the-array-from-adjacent-pairs/)|\n|[SatisfiabilityOfEquations](graph/SatisfiabilityOfEquations.java)|[https://leetcode.com/problems/satisfiability-of-equality-equations/](https://leetcode.com/problems/satisfiability-of-equality-equations/)|\n|[ShortestBridge](graph/ShortestBridge.java)|[https://leetcode.com/problems/shortest-bridge](https://leetcode.com/problems/shortest-bridge)|\n|[ShortestDistanceAfterRoadAdditionQueries1](graph/ShortestDistanceAfterRoadAdditionQueries1.java)|[https://leetcode.com/problems/shortest-distance-after-road-addition-queries-i](https://leetcode.com/problems/shortest-distance-after-road-addition-queries-i)|\n|[ShortestPathInABinaryGraph](graph/ShortestPathInABinaryGraph.java)|[https://leetcode.com/problems/shortest-path-in-binary-matrix/](https://leetcode.com/problems/shortest-path-in-binary-matrix/)|\n|[ShortestPathVisitingAllNodes](graph/ShortestPathVisitingAllNodes.java)|[https://leetcode.com/problems/shortest-path-visiting-all-nodes](https://leetcode.com/problems/shortest-path-visiting-all-nodes)|\n|[TimeNeededToInform](graph/TimeNeededToInform.java)|[https://leetcode.com/problems/time-needed-to-inform-all-employees](https://leetcode.com/problems/time-needed-to-inform-all-employees)|\n|[ValidArrangementOfPairs](graph/ValidArrangementOfPairs.java)|[https://leetcode.com/problems/valid-arrangement-of-pairs](https://leetcode.com/problems/valid-arrangement-of-pairs)|\n|[WaterAndJugProblem](graph/WaterAndJugProblem.java)|[https://leetcode.com/problems/water-and-jug-problem](https://leetcode.com/problems/water-and-jug-problem)|\n|Total|48|\n\n\n#### Heap\n|Solution|Leetcode Link|\n|--------|-----------|\n|[DistantBarcodes](heap/DistantBarcodes.java)|[https://leetcode.com/problems/distant-barcodes](https://leetcode.com/problems/distant-barcodes)|\n|[FarthestBuildingYouCanReach](heap/FarthestBuildingYouCanReach.java)|[https://leetcode.com/problems/furthest-building-you-can-reach](https://leetcode.com/problems/furthest-building-you-can-reach)|\n|[FoodRatings](heap/FoodRatings.java)|[https://leetcode.com/problems/design-a-food-rating-system](https://leetcode.com/problems/design-a-food-rating-system)|\n|[LargestNumberAfterSwapByParity](heap/LargestNumberAfterSwapByParity.java)|[https://leetcode.com/problems/largest-number-after-digit-swaps-by-parity](https://leetcode.com/problems/largest-number-after-digit-swaps-by-parity)|\n|[MaximalScoreAfterApplyingKOperations](heap/MaximalScoreAfterApplyingKOperations.java)|[https://leetcode.com/problems/maximal-score-after-applying-k-operations](https://leetcode.com/problems/maximal-score-after-applying-k-operations)|\n|[MaximumProductsAfterKIncrements](heap/MaximumProductsAfterKIncrements.java)|[https://leetcode.com/problems/maximum-product-after-k-increments](https://leetcode.com/problems/maximum-product-after-k-increments)|\n|[MaximumSumWithAtmostKElements](heap/MaximumSumWithAtmostKElements.java)|[https://leetcode.com/problems/maximum-sum-with-at-most-k-elements/](https://leetcode.com/problems/maximum-sum-with-at-most-k-elements/)|\n|[MaxScoreFromRemovingStones](heap/MaxScoreFromRemovingStones.java)|[https://leetcode.com/problems/maximum-score-from-removing-stones](https://leetcode.com/problems/maximum-score-from-removing-stones)|\n|[MaxSubsequence](heap/MaxSubsequence.java)|[https://leetcode.com/problems/find-subsequence-of-length-k-with-the-largest-sum](https://leetcode.com/problems/find-subsequence-of-length-k-with-the-largest-sum)|\n|[MeetingRooms3](heap/MeetingRooms3.java)|[https://leetcode.com/problems/meeting-rooms-iii](https://leetcode.com/problems/meeting-rooms-iii)|\n|[MinimumDeviationInArray](heap/MinimumDeviationInArray.java)|[https://leetcode.com/problems/minimize-deviation-in-array](https://leetcode.com/problems/minimize-deviation-in-array)|\n|[MinimumOperationsToExceedThresholdValue2](heap/MinimumOperationsToExceedThresholdValue2.java)|[https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-ii/](https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-ii/)|\n|[MinimumOperationsToHaveHalfArraySum](heap/MinimumOperationsToHaveHalfArraySum.java)|[https://leetcode.com/problems/minimum-operations-to-halve-array-sum](https://leetcode.com/problems/minimum-operations-to-halve-array-sum)|\n|[MinStones](heap/MinStones.java)|[https://leetcode.com/problems/remove-stones-to-minimize-the-total](https://leetcode.com/problems/remove-stones-to-minimize-the-total)|\n|[NumberContainerSystem](heap/NumberContainerSystem.java)|[https://leetcode.com/problems/design-a-number-container-system](https://leetcode.com/problems/design-a-number-container-system)|\n|[ReduceArrayToHalf](heap/ReduceArrayToHalf.java)|[https://leetcode.com/problems/reduce-array-size-to-the-half](https://leetcode.com/problems/reduce-array-size-to-the-half)|\n|[ReorganizeStrings](heap/ReorganizeStrings.java)|[https://leetcode.com/problems/reorganize-string/](https://leetcode.com/problems/reorganize-string/)|\n|[SeatReservation](heap/SeatReservation.java)|[https://leetcode.com/problems/seat-reservation-manager](https://leetcode.com/problems/seat-reservation-manager)|\n|[SlidingWindowMaximum](heap/SlidingWindowMaximum.java)|[https://leetcode.com/problems/sliding-window-maximum](https://leetcode.com/problems/sliding-window-maximum)|\n|[SlidingWindowMedian](heap/SlidingWindowMedian.java)|[https://leetcode.com/problems/sliding-window-median/](https://leetcode.com/problems/sliding-window-median/)|\n|[StoneGame6](heap/StoneGame6.java)|[https://leetcode.com/problems/stone-game-vi](https://leetcode.com/problems/stone-game-vi)|\n|[TaskScheduler](heap/TaskScheduler.java)|[https://leetcode.com/problems/task-scheduler](https://leetcode.com/problems/task-scheduler)|\n|[TotalCostToHireKWorkers](heap/TotalCostToHireKWorkers.java)|[https://leetcode.com/problems/total-cost-to-hire-k-workers](https://leetcode.com/problems/total-cost-to-hire-k-workers)|\n|Total|23|\n\n\n#### Linked List\n|Solution|Leetcode Link|\n|--------|-----------|\n|[CopyListWithRandomPointer](linked_list/CopyListWithRandomPointer.java)|[https://leetcode.com/problems/copy-list-with-random-pointer](https://leetcode.com/problems/copy-list-with-random-pointer)|\n|[DeleteDuplicates](linked_list/DeleteDuplicates.java)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorphish%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorphish%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorphish%2Fleetcode/lists"}