https://github.com/corphish/leetcode
My solutions to the various leetcode problems
https://github.com/corphish/leetcode
Last synced: 29 days ago
JSON representation
My solutions to the various leetcode problems
- Host: GitHub
- URL: https://github.com/corphish/leetcode
- Owner: corphish
- Created: 2022-03-03T05:25:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-14T10:20:29.000Z (about 1 year ago)
- Last Synced: 2025-10-30T17:58:18.132Z (9 months ago)
- Language: Java
- Size: 1.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LeetCode solutions
My 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/).
## Solutions
Solutions 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/).
#### Arrays
|Solution|Leetcode Link|
|--------|-----------|
|[132Pattern](arrays/132Pattern.java)|[https://leetcode.com/problems/132-pattern/](https://leetcode.com/problems/132-pattern/)|
|[3Sum](arrays/3Sum.java)|-|
|[3SumClosest](arrays/3SumClosest.java)|[https://leetcode.com/problems/3sum-closest/](https://leetcode.com/problems/3sum-closest/)|
|[3SumMulti](arrays/3SumMulti.java)|[https://leetcode.com/problems/3sum-with-multiplicity](https://leetcode.com/problems/3sum-with-multiplicity)|
|[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)|
|[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)|
|[AlternatingColors1](arrays/AlternatingColors1.java)|[https://leetcode.com/problems/alternating-groups-i/](https://leetcode.com/problems/alternating-groups-i/)|
|[AlternatingColors2](arrays/AlternatingColors2.java)|[https://leetcode.com/problems/alternating-groups-ii/](https://leetcode.com/problems/alternating-groups-ii/)|
|[AntOnTheBoundary](arrays/AntOnTheBoundary.java)|[https://leetcode.com/problems/ant-on-the-boundary/](https://leetcode.com/problems/ant-on-the-boundary/)|
|[ArrayOfDoubledPairs](arrays/ArrayOfDoubledPairs.java)|[https://leetcode.com/problems/array-of-doubled-pairs/](https://leetcode.com/problems/array-of-doubled-pairs/)|
|[ArrayPairSum](arrays/ArrayPairSum.java)|[https://leetcode.com/problems/array-partition-i/](https://leetcode.com/problems/array-partition-i/)|
|[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)|
|[AsFarFromLandAsPossible](arrays/AsFarFromLandAsPossible.java)|[https://leetcode.com/problems/as-far-from-land-as-possible/](https://leetcode.com/problems/as-far-from-land-as-possible/)|
|[AssignCookies](arrays/AssignCookies.java)|[https://leetcode.com/problems/assign-cookies](https://leetcode.com/problems/assign-cookies)|
|[AverageWaitingTime](arrays/AverageWaitingTime.java)|[https://leetcode.com/problems/average-waiting-time](https://leetcode.com/problems/average-waiting-time)|
|[BagOfTokens](arrays/BagOfTokens.java)|[https://leetcode.com/problems/bag-of-tokens](https://leetcode.com/problems/bag-of-tokens)|
|[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)|
|[BinarySubarraysWithSum](arrays/BinarySubarraysWithSum.java)|[https://leetcode.com/problems/binary-subarrays-with-sum](https://leetcode.com/problems/binary-subarrays-with-sum)|
|[BoatSavePeople](arrays/BoatSavePeople.java)|-|
|[BoatsToSavePeople](arrays/BoatsToSavePeople.java)|[https://leetcode.com/problems/boats-to-save-people/](https://leetcode.com/problems/boats-to-save-people/)|
|[CalculateScoreAfterPerformingInstructions](arrays/CalculateScoreAfterPerformingInstructions.java)|[https://leetcode.com/problems/calculate-score-after-performing-instructions/](https://leetcode.com/problems/calculate-score-after-performing-instructions/)|
|[Candy](arrays/Candy.java)|[https://leetcode.com/problems/candy](https://leetcode.com/problems/candy)|
|[CanJump](arrays/CanJump.java)|[https://leetcode.com/problems/jump-game/](https://leetcode.com/problems/jump-game/)|
|[CanPlaceFlowers](arrays/CanPlaceFlowers.java)|[https://leetcode.com/problems/can-place-flowers/](https://leetcode.com/problems/can-place-flowers/)|
|[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/)|
|[CarPooling](arrays/CarPooling.java)|[https://leetcode.com/problems/car-pooling/](https://leetcode.com/problems/car-pooling/)|
|[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)|
|[ClosestEqualElementQueries](arrays/ClosestEqualElementQueries.java)|[https://leetcode.com/problems/closest-equal-element-queries/](https://leetcode.com/problems/closest-equal-element-queries/)|
|[CombinationSum](arrays/CombinationSum.java)|[https://leetcode.com/problems/combination-sum](https://leetcode.com/problems/combination-sum)|
|[CombinationSum3](arrays/CombinationSum3.java)|[https://leetcode.com/problems/combination-sum-iii](https://leetcode.com/problems/combination-sum-iii)|
|[ContainsDuplicates](arrays/ContainsDuplicates.java)|-|
|[ContainsNearbyDuplicates](arrays/ContainsNearbyDuplicates.java)|[https://leetcode.com/problems/contains-duplicate-ii](https://leetcode.com/problems/contains-duplicate-ii)|
|[ContiguousArray](arrays/ContiguousArray.java)|[https://leetcode.com/problems/contiguous-array/](https://leetcode.com/problems/contiguous-array/)|
|[ContinuousSubarraySum](arrays/ContinuousSubarraySum.java)|[https://leetcode.com/problems/continuous-subarray-sum](https://leetcode.com/problems/continuous-subarray-sum)|
|[Convert1DArrayTo2DArray](arrays/Convert1DArrayTo2DArray.java)|[https://leetcode.com/problems/convert-1d-array-into-2d-array](https://leetcode.com/problems/convert-1d-array-into-2d-array)|
|[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)|
|[CorporateFlightBookings](arrays/CorporateFlightBookings.java)|[https://leetcode.com/problems/corporate-flight-bookings](https://leetcode.com/problems/corporate-flight-bookings)|
|[CountCompleteSubarraysInArray](arrays/CountCompleteSubarraysInArray.java)|[https://leetcode.com/problems/count-complete-subarrays-in-an-array](https://leetcode.com/problems/count-complete-subarrays-in-an-array)|
|[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)|
|[CountElementsWithMaximumFrequency](arrays/CountElementsWithMaximumFrequency.java)|[https://leetcode.com/problems/count-elements-with-maximum-frequency/](https://leetcode.com/problems/count-elements-with-maximum-frequency/)|
|[CountGoodTriplets](arrays/CountGoodTriplets.java)|[https://leetcode.com/problems/count-good-triplets/](https://leetcode.com/problems/count-good-triplets/)|
|[CountNumberOfBadPairs](arrays/CountNumberOfBadPairs.java)|[https://leetcode.com/problems/count-number-of-bad-pairs/](https://leetcode.com/problems/count-number-of-bad-pairs/)|
|[CountNumberOfFairPairs](arrays/CountNumberOfFairPairs.java)|[https://leetcode.com/problems/count-the-number-of-fair-pairs](https://leetcode.com/problems/count-the-number-of-fair-pairs)|
|[CountNumberOfNiceSubarrays](arrays/CountNumberOfNiceSubarrays.java)|[https://leetcode.com/problems/count-number-of-nice-subarrays](https://leetcode.com/problems/count-number-of-nice-subarrays)|
|[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)|
|[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)|
|[CountServersThatCommunicate](arrays/CountServersThatCommunicate.java)|[https://leetcode.com/problems/count-servers-that-communicate](https://leetcode.com/problems/count-servers-that-communicate)|
|[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)|
|[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)|
|[CountSubarraysWithFixedBounds](arrays/CountSubarraysWithFixedBounds.java)|[https://leetcode.com/problems/count-subarrays-with-fixed-bounds](https://leetcode.com/problems/count-subarrays-with-fixed-bounds)|
|[CountTestedDevicesAfterTestOperations](arrays/CountTestedDevicesAfterTestOperations.java)|[https://leetcode.com/problems/count-tested-devices-after-test-operations/](https://leetcode.com/problems/count-tested-devices-after-test-operations/)|
|[CountTheNumberOfGoodSubarrays](arrays/CountTheNumberOfGoodSubarrays.java)|[https://leetcode.com/problems/count-the-number-of-good-subarrays/](https://leetcode.com/problems/count-the-number-of-good-subarrays/)|
|[DecompressRunLengthEncodedList](arrays/DecompressRunLengthEncodedList.java)|[https://leetcode.com/problems/decompress-run-length-encoded-list/](https://leetcode.com/problems/decompress-run-length-encoded-list/)|
|[DefuseTheBomb](arrays/DefuseTheBomb.java)|[https://leetcode.com/problems/defuse-the-bomb](https://leetcode.com/problems/defuse-the-bomb)|
|[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/)|
|[DiagonalTraverse2](arrays/DiagonalTraverse2.java)|[https://leetcode.com/problems/diagonal-traverse-ii](https://leetcode.com/problems/diagonal-traverse-ii)|
|[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)|
|[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)|
|[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/)|
|[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)|
|[Dota2Senate](arrays/Dota2Senate.java)|[https://leetcode.com/problems/dota2-senate](https://leetcode.com/problems/dota2-senate)|
|[EarliestPossibleDayOfFullBloom](arrays/EarliestPossibleDayOfFullBloom.java)|[https://leetcode.com/problems/earliest-possible-day-of-full-bloom](https://leetcode.com/problems/earliest-possible-day-of-full-bloom)|
|[EatPizzas](arrays/EatPizzas.java)|[https://leetcode.com/problems/eat-pizzas/](https://leetcode.com/problems/eat-pizzas/)|
|[EmployeeImportance](arrays/EmployeeImportance.java)|[https://leetcode.com/problems/employee-importance](https://leetcode.com/problems/employee-importance)|
|[EqualRowAndColumnPairs](arrays/EqualRowAndColumnPairs.java)|[https://leetcode.com/problems/equal-row-and-column-pairs](https://leetcode.com/problems/equal-row-and-column-pairs)|
|[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/)|
|[FindAllDuplicatesInArray](arrays/FindAllDuplicatesInArray.java)|[https://leetcode.com/problems/find-all-duplicates-in-an-array](https://leetcode.com/problems/find-all-duplicates-in-an-array)|
|[FindCommonElementsBetween2Arrays](arrays/FindCommonElementsBetween2Arrays.java)|[https://leetcode.com/problems/find-common-elements-between-two-arrays](https://leetcode.com/problems/find-common-elements-between-two-arrays)|
|[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)|
|[FindEvenNumber](arrays/FindEvenNumber.java)|[https://leetcode.com/problems/finding-3-digit-even-numbers](https://leetcode.com/problems/finding-3-digit-even-numbers)|
|[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/)|
|[FindIfArrayCanBeSorted](arrays/FindIfArrayCanBeSorted.java)|[https://leetcode.com/problems/find-if-array-can-be-sorted/](https://leetcode.com/problems/find-if-array-can-be-sorted/)|
|[FindInMountainArray](arrays/FindInMountainArray.java)|[https://leetcode.com/problems/find-in-mountain-array/submissions/1146749102/](https://leetcode.com/problems/find-in-mountain-array/submissions/1146749102/)|
|[FindKPairsWithSmallestSum](arrays/FindKPairsWithSmallestSum.java)|[https://leetcode.com/problems/find-k-pairs-with-smallest-sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums)|
|[FindKthSmallestPairDistance](arrays/FindKthSmallestPairDistance.java)|[https://leetcode.com/problems/find-k-th-smallest-pair-distance](https://leetcode.com/problems/find-k-th-smallest-pair-distance)|
|[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/)|
|[FindMissingAndRepeatedValues](arrays/FindMissingAndRepeatedValues.java)|[https://leetcode.com/problems/find-missing-and-repeated-values/](https://leetcode.com/problems/find-missing-and-repeated-values/)|
|[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/)|
|[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/)|
|[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/)|
|[FindOriginalFromDoubledArray](arrays/FindOriginalFromDoubledArray.java)|[https://leetcode.com/problems/find-original-array-from-doubled-array](https://leetcode.com/problems/find-original-array-from-doubled-array)|
|[FindPeakElement](arrays/FindPeakElement.java)|[https://leetcode.com/problems/find-peak-element](https://leetcode.com/problems/find-peak-element)|
|[FindPivotIndex](arrays/FindPivotIndex.java)|[https://leetcode.com/problems/find-pivot-index/](https://leetcode.com/problems/find-pivot-index/)|
|[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/)|
|[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)|
|[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)|
|[FindTheDifferenceOfTwoArrays](arrays/FindTheDifferenceOfTwoArrays.java)|[https://leetcode.com/problems/find-the-difference-of-two-arrays](https://leetcode.com/problems/find-the-difference-of-two-arrays)|
|[FindTheDistinctDifferenceArray](arrays/FindTheDistinctDifferenceArray.java)|[https://leetcode.com/problems/find-the-distinct-difference-array/](https://leetcode.com/problems/find-the-distinct-difference-array/)|
|[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/)|
|[FindTheLargestAlmostMissingInteger](arrays/FindTheLargestAlmostMissingInteger.java)|[https://leetcode.com/problems/find-the-largest-almost-missing-integer/](https://leetcode.com/problems/find-the-largest-almost-missing-integer/)|
|[FindTheMiddleIndexInArray](arrays/FindTheMiddleIndexInArray.java)|[https://leetcode.com/problems/find-the-middle-index-in-array/](https://leetcode.com/problems/find-the-middle-index-in-array/)|
|[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)|
|[FindThePeaks](arrays/FindThePeaks.java)|[https://leetcode.com/problems/find-the-peaks/](https://leetcode.com/problems/find-the-peaks/)|
|[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)|
|[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)|
|[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)|
|[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)|
|[FirstCompletelyPaintedRowOrColumn](arrays/FirstCompletelyPaintedRowOrColumn.java)|[https://leetcode.com/problems/first-completely-painted-row-or-column](https://leetcode.com/problems/first-completely-painted-row-or-column)|
|[FlippingAnImage](arrays/FlippingAnImage.java)|[https://leetcode.com/problems/flipping-an-image/](https://leetcode.com/problems/flipping-an-image/)|
|[FruitsIntoBasket](arrays/FruitsIntoBasket.java)|[https://leetcode.com/problems/fruit-into-baskets/](https://leetcode.com/problems/fruit-into-baskets/)|
|[GameOfLife](arrays/GameOfLife.java)|[https://leetcode.com/problems/game-of-life](https://leetcode.com/problems/game-of-life)|
|[GasStation](arrays/GasStation.java)|[https://leetcode.com/problems/gas-station/](https://leetcode.com/problems/gas-station/)|
|[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)|
|[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)|
|[GrumpyBookStoreOwner](arrays/GrumpyBookStoreOwner.java)|[https://leetcode.com/problems/grumpy-bookstore-owner](https://leetcode.com/problems/grumpy-bookstore-owner)|
|[HandOfStraights](arrays/HandOfStraights.java)|[https://leetcode.com/problems/hand-of-straights](https://leetcode.com/problems/hand-of-straights)|
|[HighestAltitude](arrays/HighestAltitude.java)|[https://leetcode.com/problems/find-the-highest-altitude](https://leetcode.com/problems/find-the-highest-altitude)|
|[HIndex](arrays/HIndex.java)|[https://leetcode.com/problems/h-index/](https://leetcode.com/problems/h-index/)|
|[HIndex2](arrays/HIndex2.java)|[https://leetcode.com/problems/h-index-ii](https://leetcode.com/problems/h-index-ii)|
|[IncreasingTripletSubsequence](arrays/IncreasingTripletSubsequence.java)|[https://leetcode.com/problems/increasing-triplet-subsequence](https://leetcode.com/problems/increasing-triplet-subsequence)|
|[IntersectionOf2Arrays](arrays/IntersectionOf2Arrays.java)|[https://leetcode.com/problems/intersection-of-two-arrays](https://leetcode.com/problems/intersection-of-two-arrays)|
|[IntersectionOf2Arrays2](arrays/IntersectionOf2Arrays2.java)|[https://leetcode.com/problems/intersection-of-two-arrays-ii](https://leetcode.com/problems/intersection-of-two-arrays-ii)|
|[JumpGame2](arrays/JumpGame2.java)|[https://leetcode.com/problems/jump-game-ii/](https://leetcode.com/problems/jump-game-ii/)|
|[KDivisibleElementsInSubarrays](arrays/KDivisibleElementsInSubarrays.java)|[https://leetcode.com/problems/k-divisible-elements-subarrays](https://leetcode.com/problems/k-divisible-elements-subarrays)|
|[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)|
|[KokoEatingBananas](arrays/KokoEatingBananas.java)|[https://leetcode.com/problems/koko-eating-bananas/](https://leetcode.com/problems/koko-eating-bananas/)|
|[KRadiusSubarrayAverages](arrays/KRadiusSubarrayAverages.java)|[https://leetcode.com/problems/k-radius-subarray-averages/](https://leetcode.com/problems/k-radius-subarray-averages/)|
|[KthElementInSortedMatrix](arrays/KthElementInSortedMatrix.java)|-|
|[KthLargestElementInStream](arrays/KthLargestElementInStream.java)|[https://leetcode.com/problems/kth-largest-element-in-a-stream/](https://leetcode.com/problems/kth-largest-element-in-a-stream/)|
|[KthSmallestPrimeFraction](arrays/KthSmallestPrimeFraction.java)|[https://leetcode.com/problems/k-th-smallest-prime-fraction](https://leetcode.com/problems/k-th-smallest-prime-fraction)|
|[KthSmallestTrimmedNumber](arrays/KthSmallestTrimmedNumber.java)|[https://leetcode.com/problems/query-kth-smallest-trimmed-number](https://leetcode.com/problems/query-kth-smallest-trimmed-number)|
|[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)|
|[LargestNumber](arrays/LargestNumber.java)|[https://leetcode.com/problems/largest-number](https://leetcode.com/problems/largest-number)|
|[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/)|
|[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)|
|[LargestValuesFromLabels](arrays/LargestValuesFromLabels.java)|[https://leetcode.com/problems/largest-values-from-labels/](https://leetcode.com/problems/largest-values-from-labels/)|
|[LastStoneWeight](arrays/LastStoneWeight.java)|[https://leetcode.com/problems/last-stone-weight](https://leetcode.com/problems/last-stone-weight)|
|[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/)|
|[LemonadeChange](arrays/LemonadeChange.java)|[https://leetcode.com/problems/lemonade-change](https://leetcode.com/problems/lemonade-change)|
|[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)|
|[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)|
|[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)|
|[LongestSubsequenceWithLimitedSum](arrays/LongestSubsequenceWithLimitedSum.java)|[https://leetcode.com/problems/longest-subsequence-with-limited-sum/](https://leetcode.com/problems/longest-subsequence-with-limited-sum/)|
|[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)|
|[LuckyNumbersInAMatrix](arrays/LuckyNumbersInAMatrix.java)|[https://leetcode.com/problems/lucky-numbers-in-a-matrix/](https://leetcode.com/problems/lucky-numbers-in-a-matrix/)|
|[MajorityElement](arrays/MajorityElement.java)|[https://leetcode.com/problems/majority-element](https://leetcode.com/problems/majority-element)|
|[MaxChunksToMakeArraySorted](arrays/MaxChunksToMakeArraySorted.java)|[https://leetcode.com/problems/max-chunks-to-make-sorted](https://leetcode.com/problems/max-chunks-to-make-sorted)|
|[MaxChunksToMakeArraySorted2](arrays/MaxChunksToMakeArraySorted2.java)|[https://leetcode.com/problems/max-chunks-to-make-sorted-ii/](https://leetcode.com/problems/max-chunks-to-make-sorted-ii/)|
|[MaxConsecutiveOnes3](arrays/MaxConsecutiveOnes3.java)|[https://leetcode.com/problems/max-consecutive-ones-iii](https://leetcode.com/problems/max-consecutive-ones-iii)|
|[MaximizeTheConfusionOfAnExam](arrays/MaximizeTheConfusionOfAnExam.java)|[https://leetcode.com/problems/maximize-the-confusion-of-an-exam](https://leetcode.com/problems/maximize-the-confusion-of-an-exam)|
|[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)|
|[MaximumAscendingSubarray](arrays/MaximumAscendingSubarray.java)|[https://leetcode.com/problems/maximum-ascending-subarray-sum](https://leetcode.com/problems/maximum-ascending-subarray-sum)|
|[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/)|
|[MaximumDistanceInArrays](arrays/MaximumDistanceInArrays.java)|[https://leetcode.com/problems/maximum-distance-in-arrays](https://leetcode.com/problems/maximum-distance-in-arrays)|
|[MaximumEqualFrequency](arrays/MaximumEqualFrequency.java)|[https://leetcode.com/problems/maximum-equal-frequency](https://leetcode.com/problems/maximum-equal-frequency)|
|[MaximumIcecreamBars](arrays/MaximumIcecreamBars.java)|[https://leetcode.com/problems/maximum-ice-cream-bars](https://leetcode.com/problems/maximum-ice-cream-bars)|
|[MaximumLengthOfPairChain](arrays/MaximumLengthOfPairChain.java)|[https://leetcode.com/problems/maximum-length-of-pair-chain/](https://leetcode.com/problems/maximum-length-of-pair-chain/)|
|[MaximumLengthOfRepeatedSubarray](arrays/MaximumLengthOfRepeatedSubarray.java)|[https://leetcode.com/problems/maximum-length-of-repeated-subarray/](https://leetcode.com/problems/maximum-length-of-repeated-subarray/)|
|[MaximumMatrixSum](arrays/MaximumMatrixSum.java)|[https://leetcode.com/problems/maximum-matrix-sum](https://leetcode.com/problems/maximum-matrix-sum)|
|[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)|
|[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)|
|[MaximumNumberOfPairsInArray](arrays/MaximumNumberOfPairsInArray.java)|[https://leetcode.com/problems/maximum-number-of-pairs-in-array](https://leetcode.com/problems/maximum-number-of-pairs-in-array)|
|[MaximumPairSumInArray](arrays/MaximumPairSumInArray.java)|[https://leetcode.com/problems/max-pair-sum-in-an-array/](https://leetcode.com/problems/max-pair-sum-in-an-array/)|
|[MaximumProduct](arrays/MaximumProduct.java)|-|
|[MaximumSumOfAnHourglass](arrays/MaximumSumOfAnHourglass.java)|[https://leetcode.com/problems/maximum-sum-of-an-hourglass/](https://leetcode.com/problems/maximum-sum-of-an-hourglass/)|
|[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)|
|[MaximumSwaps](arrays/MaximumSwaps.java)|[https://leetcode.com/problems/maximum-swap](https://leetcode.com/problems/maximum-swap)|
|[MaximumWidthRamp](arrays/MaximumWidthRamp.java)|[https://leetcode.com/problems/maximum-width-ramp](https://leetcode.com/problems/maximum-width-ramp)|
|[MaxIncreaseToKeepCitySkylineSame](arrays/MaxIncreaseToKeepCitySkylineSame.java)|[https://leetcode.com/problems/max-increase-to-keep-city-skyline](https://leetcode.com/problems/max-increase-to-keep-city-skyline)|
|[MaxNumberOfKSumPairs](arrays/MaxNumberOfKSumPairs.java)|[https://leetcode.com/problems/max-number-of-k-sum-pairs](https://leetcode.com/problems/max-number-of-k-sum-pairs)|
|[MedianOf2SortedArrays](arrays/MedianOf2SortedArrays.java)|[https://leetcode.com/problems/median-of-two-sorted-arrays](https://leetcode.com/problems/median-of-two-sorted-arrays)|
|[MergeSortedArrays](arrays/MergeSortedArrays.java)|-|
|[MergeTriplets](arrays/MergeTriplets.java)|[https://leetcode.com/problems/merge-triplets-to-form-target-triplet/](https://leetcode.com/problems/merge-triplets-to-form-target-triplet/)|
|[MinCostToMoveChips](arrays/MinCostToMoveChips.java)|-|
|[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)|
|[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)|
|[MinimizeMaximumOfArray](arrays/MinimizeMaximumOfArray.java)|[https://leetcode.com/problems/minimize-maximum-of-array](https://leetcode.com/problems/minimize-maximum-of-array)|
|[MinimizeMaximumPairSumInArray](arrays/MinimizeMaximumPairSumInArray.java)|[https://leetcode.com/problems/minimize-maximum-pair-sum-in-array](https://leetcode.com/problems/minimize-maximum-pair-sum-in-array)|
|[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)|
|[MinimumAverageDifference](arrays/MinimumAverageDifference.java)|[https://leetcode.com/problems/minimum-average-difference](https://leetcode.com/problems/minimum-average-difference)|
|[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/)|
|[MinimumCommonValue](arrays/MinimumCommonValue.java)|[https://leetcode.com/problems/minimum-common-value](https://leetcode.com/problems/minimum-common-value)|
|[MinimumCostToMakeArrayEqual](arrays/MinimumCostToMakeArrayEqual.java)|[https://leetcode.com/problems/minimum-cost-to-make-array-equal](https://leetcode.com/problems/minimum-cost-to-make-array-equal)|
|[MinimumCostToReachEveryPosition](arrays/MinimumCostToReachEveryPosition.java)|[https://leetcode.com/problems/minimum-cost-to-reach-every-position/](https://leetcode.com/problems/minimum-cost-to-reach-every-position/)|
|[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/)|
|[MinimumInRotatedSortedArray](arrays/MinimumInRotatedSortedArray.java)|[https://leetcode.com/problems/find-minimum-in-rotated-sorted-array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array)|
|[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/)|
|[MinimumNumberGame](arrays/MinimumNumberGame.java)|[https://leetcode.com/problems/minimum-number-game/](https://leetcode.com/problems/minimum-number-game/)|
|[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/)|
|[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)|
|[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)|
|[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/)|
|[MinimumOperationsToMakeArrayEqual](arrays/MinimumOperationsToMakeArrayEqual.java)|[https://leetcode.com/problems/minimum-operations-to-make-array-equal/](https://leetcode.com/problems/minimum-operations-to-make-array-equal/)|
|[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)|
|[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)|
|[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)|
|[MinimumPenaltyForAShop](arrays/MinimumPenaltyForAShop.java)|[https://leetcode.com/problems/minimum-penalty-for-a-shop](https://leetcode.com/problems/minimum-penalty-for-a-shop)|
|[MinimumReplacementsToSortArray](arrays/MinimumReplacementsToSortArray.java)|[https://leetcode.com/problems/minimum-replacements-to-sort-the-array](https://leetcode.com/problems/minimum-replacements-to-sort-the-array)|
|[MinimumRoundsToCompleteAllTasks](arrays/MinimumRoundsToCompleteAllTasks.java)|[https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks/](https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks/)|
|[MinimumSizeSubarraySum](arrays/MinimumSizeSubarraySum.java)|-|
|[MinimumTimeDifference](arrays/MinimumTimeDifference.java)|[https://leetcode.com/problems/minimum-time-difference/](https://leetcode.com/problems/minimum-time-difference/)|
|[MinimumTimeToCompleteTrips](arrays/MinimumTimeToCompleteTrips.java)|[https://leetcode.com/problems/minimum-time-to-complete-trips/](https://leetcode.com/problems/minimum-time-to-complete-trips/)|
|[MinimumWindowSubstring](arrays/MinimumWindowSubstring.java)|[https://leetcode.com/problems/minimum-window-substring](https://leetcode.com/problems/minimum-window-substring)|
|[MinMovesToMakeArrayZigzag](arrays/MinMovesToMakeArrayZigzag.java)|[https://leetcode.com/problems/decrease-elements-to-make-array-zigzag](https://leetcode.com/problems/decrease-elements-to-make-array-zigzag)|
|[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)|
|[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)|
|[MissingNumber](arrays/MissingNumber.java)|[https://leetcode.com/problems/missing-number](https://leetcode.com/problems/missing-number)|
|[ModifyTheMatrix](arrays/ModifyTheMatrix.java)|[https://leetcode.com/problems/modify-the-matrix](https://leetcode.com/problems/modify-the-matrix)|
|[MostBeautifulItemForEachQuery](arrays/MostBeautifulItemForEachQuery.java)|[https://leetcode.com/problems/most-beautiful-item-for-each-query/](https://leetcode.com/problems/most-beautiful-item-for-each-query/)|
|[MostFrequentEvenElement](arrays/MostFrequentEvenElement.java)|[https://leetcode.com/problems/most-frequent-even-element](https://leetcode.com/problems/most-frequent-even-element)|
|[MostPopularVideoCreator](arrays/MostPopularVideoCreator.java)|[https://leetcode.com/problems/most-popular-video-creator/](https://leetcode.com/problems/most-popular-video-creator/)|
|[MostProfitAssigningWork](arrays/MostProfitAssigningWork.java)|[https://leetcode.com/problems/most-profit-assigning-work](https://leetcode.com/problems/most-profit-assigning-work)|
|[NamingACompany](arrays/NamingACompany.java)|[https://leetcode.com/problems/naming-a-company/](https://leetcode.com/problems/naming-a-company/)|
|[NextGreaterElement](arrays/NextGreaterElement.java)|[https://leetcode.com/problems/next-greater-element-i](https://leetcode.com/problems/next-greater-element-i)|
|[NextGreaterElement2](arrays/NextGreaterElement2.java)|[https://leetcode.com/problems/next-greater-element-ii](https://leetcode.com/problems/next-greater-element-ii)|
|[NonDecreasingArray](arrays/NonDecreasingArray.java)|[https://leetcode.com/problems/non-decreasing-array](https://leetcode.com/problems/non-decreasing-array)|
|[NonDecreasingSubsequences](arrays/NonDecreasingSubsequences.java)|[https://leetcode.com/problems/non-decreasing-subsequences/](https://leetcode.com/problems/non-decreasing-subsequences/)|
|[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/)|
|[NumberOfArithmeticTriplets](arrays/NumberOfArithmeticTriplets.java)|[https://leetcode.com/problems/number-of-arithmetic-triplets](https://leetcode.com/problems/number-of-arithmetic-triplets)|
|[NumberOfFlowersInFullBloom](arrays/NumberOfFlowersInFullBloom.java)|[https://leetcode.com/problems/number-of-flowers-in-full-bloom](https://leetcode.com/problems/number-of-flowers-in-full-bloom)|
|[NumberOfGoodPairs](arrays/NumberOfGoodPairs.java)|[https://leetcode.com/problems/number-of-good-pairs](https://leetcode.com/problems/number-of-good-pairs)|
|[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)|
|[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)|
|[NumberOfLinesToWriteString](arrays/NumberOfLinesToWriteString.java)|[https://leetcode.com/problems/number-of-lines-to-write-string/](https://leetcode.com/problems/number-of-lines-to-write-string/)|
|[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/)|
|[NumberOfSeniorCitizens](arrays/NumberOfSeniorCitizens.java)|[https://leetcode.com/problems/number-of-senior-citizens/](https://leetcode.com/problems/number-of-senior-citizens/)|
|[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/)|
|[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/)|
|[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)|
|[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/)|
|[NumberOfZeroFilledSubArrays](arrays/NumberOfZeroFilledSubArrays.java)|[https://leetcode.com/problems/number-of-zero-filled-subarrays/](https://leetcode.com/problems/number-of-zero-filled-subarrays/)|
|[NumbersWithSameConsecutiveDifferences](arrays/NumbersWithSameConsecutiveDifferences.java)|[https://leetcode.com/problems/numbers-with-same-consecutive-differences](https://leetcode.com/problems/numbers-with-same-consecutive-differences)|
|[NumFriendRequests](arrays/NumFriendRequests.java)|-|
|[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/)|
|[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/)|
|[PeakIndexInMountainArray](arrays/PeakIndexInMountainArray.java)|[https://leetcode.com/problems/peak-index-in-a-mountain-array](https://leetcode.com/problems/peak-index-in-a-mountain-array)|
|[Permutations](arrays/Permutations.java)|[https://leetcode.com/problems/permutations/](https://leetcode.com/problems/permutations/)|
|[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)|
|[ProductOfArrayExceptSelf](arrays/ProductOfArrayExceptSelf.java)|[https://leetcode.com/problems/product-of-array-except-self](https://leetcode.com/problems/product-of-array-except-self)|
|[QueriesOnPermutationWithKey](arrays/QueriesOnPermutationWithKey.java)|[https://leetcode.com/problems/queries-on-a-permutation-with-key](https://leetcode.com/problems/queries-on-a-permutation-with-key)|
|[RabbitsInForest](arrays/RabbitsInForest.java)|[https://leetcode.com/problems/rabbits-in-forest](https://leetcode.com/problems/rabbits-in-forest)|
|[RandomizedSet](arrays/RandomizedSet.java)|[https://leetcode.com/problems/insert-delete-getrandom-o1](https://leetcode.com/problems/insert-delete-getrandom-o1)|
|[RandomizedSetDuplicates](arrays/RandomizedSetDuplicates.java)|[https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed](https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed)|
|[RandomPickWithBlacklist](arrays/RandomPickWithBlacklist.java)|-|
|[RangeFrequencyQueries](arrays/RangeFrequencyQueries.java)|[https://leetcode.com/problems/range-frequency-queries/](https://leetcode.com/problems/range-frequency-queries/)|
|[RangeSumOfSortedSubArraySums](arrays/RangeSumOfSortedSubArraySums.java)|[https://leetcode.com/problems/range-sum-of-sorted-subarray-sums](https://leetcode.com/problems/range-sum-of-sorted-subarray-sums)|
|[RangeSumQuery](arrays/RangeSumQuery.java)|[https://leetcode.com/problems/range-sum-query-immutable](https://leetcode.com/problems/range-sum-query-immutable)|
|[RangeSumQuery2DImmutable](arrays/RangeSumQuery2DImmutable.java)|[https://leetcode.com/problems/range-sum-query-2d-immutable/](https://leetcode.com/problems/range-sum-query-2d-immutable/)|
|[RankTransformOfAnArray](arrays/RankTransformOfAnArray.java)|[https://leetcode.com/problems/rank-transform-of-an-array](https://leetcode.com/problems/rank-transform-of-an-array)|
|[RearrangeArrayElementsBySign](arrays/RearrangeArrayElementsBySign.java)|[https://leetcode.com/problems/rearrange-array-elements-by-sign](https://leetcode.com/problems/rearrange-array-elements-by-sign)|
|[ReducingDishes](arrays/ReducingDishes.java)|[https://leetcode.com/problems/reducing-dishes/](https://leetcode.com/problems/reducing-dishes/)|
|[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)|
|[RelativeRanks](arrays/RelativeRanks.java)|[https://leetcode.com/problems/relative-ranks](https://leetcode.com/problems/relative-ranks)|
|[RemoveCoveredIntervals](arrays/RemoveCoveredIntervals.java)|[https://leetcode.com/problems/remove-covered-intervals/](https://leetcode.com/problems/remove-covered-intervals/)|
|[RemoveDuplicatesFromSortedArray](arrays/RemoveDuplicatesFromSortedArray.java)|[https://leetcode.com/problems/remove-duplicates-from-sorted-array](https://leetcode.com/problems/remove-duplicates-from-sorted-array)|
|[ReorderedPowerOf2](arrays/ReorderedPowerOf2.java)|[https://leetcode.com/problems/reordered-power-of-2](https://leetcode.com/problems/reordered-power-of-2)|
|[ReplaceElementsInArray](arrays/ReplaceElementsInArray.java)|[https://leetcode.com/problems/replace-elements-in-an-array](https://leetcode.com/problems/replace-elements-in-an-array)|
|[ReshapeMatrix](arrays/ReshapeMatrix.java)|-|
|[RingsAndRods](arrays/RingsAndRods.java)|[https://leetcode.com/problems/rings-and-rods](https://leetcode.com/problems/rings-and-rods)|
|[RLEIterator](arrays/RLEIterator.java)|[https://leetcode.com/problems/rle-iterator](https://leetcode.com/problems/rle-iterator)|
|[RotateArray](arrays/RotateArray.java)|-|
|[RotatedBinarySearch](arrays/RotatedBinarySearch.java)|-|
|[RotateImage](arrays/RotateImage.java)|[https://leetcode.com/problems/rotate-image/submissions/](https://leetcode.com/problems/rotate-image/submissions/)|
|[ScoreAfterFlippingMatrix](arrays/ScoreAfterFlippingMatrix.java)|[https://leetcode.com/problems/score-after-flipping-matrix](https://leetcode.com/problems/score-after-flipping-matrix)|
|[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/)|
|[Search2DMatrix](arrays/Search2DMatrix.java)|[https://leetcode.com/problems/search-a-2d-matrix](https://leetcode.com/problems/search-a-2d-matrix)|
|[Search2DMatrix2](arrays/Search2DMatrix2.java)|[https://leetcode.com/problems/search-a-2d-matrix-ii/](https://leetcode.com/problems/search-a-2d-matrix-ii/)|
|[SearchInsertPosition](arrays/SearchInsertPosition.java)|[https://leetcode.com/problems/search-insert-position/](https://leetcode.com/problems/search-insert-position/)|
|[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/)|
|[SeparateBlackAndWhiteBalls](arrays/SeparateBlackAndWhiteBalls.java)|[https://leetcode.com/problems/separate-black-and-white-balls](https://leetcode.com/problems/separate-black-and-white-balls)|
|[SetMatrixZeroes](arrays/SetMatrixZeroes.java)|-|
|[SetMismatch](arrays/SetMismatch.java)|[https://leetcode.com/problems/set-mismatch](https://leetcode.com/problems/set-mismatch)|
|[ShiftGrid](arrays/ShiftGrid.java)|-|
|[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)|
|[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)|
|[ShuffleTheArray](arrays/ShuffleTheArray.java)|[https://leetcode.com/problems/shuffle-the-array](https://leetcode.com/problems/shuffle-the-array)|
|[SingleNumber2](arrays/SingleNumber2.java)|[https://leetcode.com/problems/single-number-ii/](https://leetcode.com/problems/single-number-ii/)|
|[SingleNumber3](arrays/SingleNumber3.java)|[https://leetcode.com/problems/single-number-iii/](https://leetcode.com/problems/single-number-iii/)|
|[SmallestInfiniteSet](arrays/SmallestInfiniteSet.java)|[https://leetcode.com/problems/smallest-number-in-infinite-set](https://leetcode.com/problems/smallest-number-in-infinite-set)|
|[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)|
|[SortAnArray](arrays/SortAnArray.java)|[https://leetcode.com/problems/sort-an-array](https://leetcode.com/problems/sort-an-array)|
|[SortByParity](arrays/SortByParity.java)|[https://leetcode.com/problems/sort-array-by-parity](https://leetcode.com/problems/sort-array-by-parity)|
|[SortColors](arrays/SortColors.java)|[https://leetcode.com/problems/sort-colors](https://leetcode.com/problems/sort-colors)|
|[sorting](arrays/sorting)|-|
|[SortMatrixDiagonally](arrays/SortMatrixDiagonally.java)|[https://leetcode.com/problems/sort-the-matrix-diagonally/](https://leetcode.com/problems/sort-the-matrix-diagonally/)|
|[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/)|
|[SortTheJumbledNumbers](arrays/SortTheJumbledNumbers.java)|[https://leetcode.com/problems/sort-the-jumbled-numbers/](https://leetcode.com/problems/sort-the-jumbled-numbers/)|
|[SortThePeople.kt](arrays/SortThePeople.kt)|[https://leetcode.com/problems/sort-the-people/](https://leetcode.com/problems/sort-the-people/)|
|[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)|
|[SpiralMatrix](arrays/SpiralMatrix.java)|-|
|[SpiralMatrix2](arrays/SpiralMatrix2.java)|[https://leetcode.com/problems/spiral-matrix-ii](https://leetcode.com/problems/spiral-matrix-ii)|
|[SquaresOfASortedArray](arrays/SquaresOfASortedArray.java)|[https://leetcode.com/problems/squares-of-a-sorted-array](https://leetcode.com/problems/squares-of-a-sorted-array)|
|[StackWithIncrement](arrays/StackWithIncrement.java)|[https://leetcode.com/problems/design-a-stack-with-increment-operation](https://leetcode.com/problems/design-a-stack-with-increment-operation)|
|[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/)|
|[SubarrayProductLessThanK](arrays/SubarrayProductLessThanK.java)|[https://leetcode.com/problems/subarray-product-less-than-k/](https://leetcode.com/problems/subarray-product-less-than-k/)|
|[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/)|
|[SubArraySumEqualsK](arrays/SubArraySumEqualsK.java)|[https://leetcode.com/problems/subarray-sum-equals-k](https://leetcode.com/problems/subarray-sum-equals-k)|
|[SubarraysWithKDistinctIntegers](arrays/SubarraysWithKDistinctIntegers.java)|[https://leetcode.com/problems/subarrays-with-k-different-integers](https://leetcode.com/problems/subarrays-with-k-different-integers)|
|[SuccessfulPairsOfSpellsAndPotions](arrays/SuccessfulPairsOfSpellsAndPotions.java)|[https://leetcode.com/problems/successful-pairs-of-spells-and-potions](https://leetcode.com/problems/successful-pairs-of-spells-and-potions)|
|[SumAfterEvenQueries](arrays/SumAfterEvenQueries.java)|[https://leetcode.com/problems/sum-of-even-numbers-after-queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries)|
|[SumInAMatrix](arrays/SumInAMatrix.java)|[https://leetcode.com/problems/sum-in-a-matrix/](https://leetcode.com/problems/sum-in-a-matrix/)|
|[SummaryRanges](arrays/SummaryRanges.java)|[https://leetcode.com/problems/summary-ranges](https://leetcode.com/problems/summary-ranges)|
|[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/)|
|[SumOfGoodNumbers](arrays/SumOfGoodNumbers.java)|[https://leetcode.com/problems/sum-of-good-numbers/](https://leetcode.com/problems/sum-of-good-numbers/)|
|[SumOfSubarrayMinimums](arrays/SumOfSubarrayMinimums.java)|[https://leetcode.com/problems/sum-of-subarray-minimums](https://leetcode.com/problems/sum-of-subarray-minimums)|
|[SumOfSubarrayRanges](arrays/SumOfSubarrayRanges.java)|[https://leetcode.com/problems/sum-of-subarray-ranges/](https://leetcode.com/problems/sum-of-subarray-ranges/)|
|[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)|
|[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/)|
|[TargetIndices](arrays/TargetIndices.java)|-|
|[TeemoAttacking](arrays/TeemoAttacking.java)|[https://leetcode.com/problems/teemo-attacking](https://leetcode.com/problems/teemo-attacking)|
|[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)|
|[ThirdMax](arrays/ThirdMax.java)|[https://leetcode.com/problems/third-maximum-number](https://leetcode.com/problems/third-maximum-number)|
|[ThreeConsecutiveOdds](arrays/ThreeConsecutiveOdds.java)|[https://leetcode.com/problems/three-consecutive-odds](https://leetcode.com/problems/three-consecutive-odds)|
|[TimeMap](arrays/TimeMap.java)|[https://leetcode.com/problems/time-based-key-value-store/](https://leetcode.com/problems/time-based-key-value-store/)|
|[TopKFrequentElements](arrays/TopKFrequentElements.java)|[https://leetcode.com/problems/top-k-frequent-elements](https://leetcode.com/problems/top-k-frequent-elements)|
|[TransposeMatrix](arrays/TransposeMatrix.java)|[https://leetcode.com/problems/transpose-matrix](https://leetcode.com/problems/transpose-matrix)|
|[TrappingRainWater](arrays/TrappingRainWater.java)|[https://leetcode.com/problems/trapping-rain-water](https://leetcode.com/problems/trapping-rain-water)|
|[Triangle](arrays/Triangle.java)|-|
|[TripletPermutation](arrays/TripletPermutation.java)|-|
|[TupleWithSameProduct](arrays/TupleWithSameProduct.java)|[https://leetcode.com/problems/tuple-with-same-product](https://leetcode.com/problems/tuple-with-same-product)|
|[TwoBestNonOverlappingIntervals](arrays/TwoBestNonOverlappingIntervals.java)|[https://leetcode.com/problems/two-best-non-overlapping-events](https://leetcode.com/problems/two-best-non-overlapping-events)|
|[TwoOutOfThree](arrays/TwoOutOfThree.java)|[https://leetcode.com/problems/two-out-of-three/](https://leetcode.com/problems/two-out-of-three/)|
|[UniqueNumberOfOccurences](arrays/UniqueNumberOfOccurences.java)|[https://leetcode.com/problems/unique-number-of-occurrences](https://leetcode.com/problems/unique-number-of-occurrences)|
|[UniquePaths3](arrays/UniquePaths3.java)|-|
|[UserActivityMinutes](arrays/UserActivityMinutes.java)|[https://leetcode.com/problems/finding-the-users-active-minutes](https://leetcode.com/problems/finding-the-users-active-minutes)|
|[WalkingRobotSimulation](arrays/WalkingRobotSimulation.java)|[https://leetcode.com/problems/walking-robot-simulation](https://leetcode.com/problems/walking-robot-simulation)|
|[WaysToMakeFairArray](arrays/WaysToMakeFairArray.java)|[https://leetcode.com/problems/ways-to-make-a-fair-array](https://leetcode.com/problems/ways-to-make-a-fair-array)|
|[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)|
|[ZeroArrayTransformation1](arrays/ZeroArrayTransformation1.java)|[https://leetcode.com/problems/zero-array-transformation-i](https://leetcode.com/problems/zero-array-transformation-i)|
|Total|319|
#### Backtracking
|Solution|Leetcode Link|
|--------|-----------|
|[BeautifulArrangement](backtracking/BeautifulArrangement.java)|[https://leetcode.com/problems/beautiful-arrangement/](https://leetcode.com/problems/beautiful-arrangement/)|
|[ClosestDessertCost](backtracking/ClosestDessertCost.java)|[https://leetcode.com/problems/closest-dessert-cost](https://leetcode.com/problems/closest-dessert-cost)|
|[Combinations](backtracking/Combinations.java)|[https://leetcode.com/problems/combinations](https://leetcode.com/problems/combinations)|
|[FairDistributionOfCookies](backtracking/FairDistributionOfCookies.java)|[https://leetcode.com/problems/fair-distribution-of-cookies](https://leetcode.com/problems/fair-distribution-of-cookies)|
|[GenerateBinaryStringsWithoutAdjacentZeroes](backtracking/GenerateBinaryStringsWithoutAdjacentZeroes.java)|[https://leetcode.com/problems/generate-binary-strings-without-adjacent-zeros](https://leetcode.com/problems/generate-binary-strings-without-adjacent-zeros)|
|[GrayCode](backtracking/GrayCode.java)|[https://leetcode.com/problems/gray-code/](https://leetcode.com/problems/gray-code/)|
|[LetterCombinationOfPhoneNumber](backtracking/LetterCombinationOfPhoneNumber.java)|[https://leetcode.com/problems/letter-combinations-of-a-phone-number](https://leetcode.com/problems/letter-combinations-of-a-phone-number)|
|[MaximizeScoreAfterNOperations](backtracking/MaximizeScoreAfterNOperations.java)|[https://leetcode.com/problems/maximize-score-after-n-operations](https://leetcode.com/problems/maximize-score-after-n-operations)|
|[MaximumCompatibilityScoreSum](backtracking/MaximumCompatibilityScoreSum.java)|[https://leetcode.com/problems/maximum-compatibility-score-sum](https://leetcode.com/problems/maximum-compatibility-score-sum)|
|[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)|
|[MaximumNumberOfAchievableTransferRequests](backtracking/MaximumNumberOfAchievableTransferRequests.java)|[https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests](https://leetcode.com/problems/maximum-number-of-achievable-transfer-requests)|
|[MaximumScoreWordsFormedByLetters](backtracking/MaximumScoreWordsFormedByLetters.java)|[https://leetcode.com/problems/maximum-score-words-formed-by-letters](https://leetcode.com/problems/maximum-score-words-formed-by-letters)|
|[NQueens](backtracking/NQueens.java)|[https://leetcode.com/problems/n-queens](https://leetcode.com/problems/n-queens)|
|[NQueens2](backtracking/NQueens2.java)|[https://leetcode.com/problems/n-queens-ii](https://leetcode.com/problems/n-queens-ii)|
|[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)|
|[Subsets](backtracking/Subsets.java)|[https://leetcode.com/problems/subsets/](https://leetcode.com/problems/subsets/)|
|[Subsets2](backtracking/Subsets2.java)|[https://leetcode.com/problems/subsets-ii](https://leetcode.com/problems/subsets-ii)|
|Total|17|
#### Bit Manipulation
|Solution|Leetcode Link|
|--------|-----------|
|[Bitset](bit_manipulation/Bitset.java)|[https://leetcode.com/problems/design-bitset](https://leetcode.com/problems/design-bitset)|
|[BitwiseAndOfNumberRange](bit_manipulation/BitwiseAndOfNumberRange.java)|[https://leetcode.com/problems/bitwise-and-of-numbers-range](https://leetcode.com/problems/bitwise-and-of-numbers-range)|
|[ChalkboardXORGame](bit_manipulation/ChalkboardXORGame.java)|[https://leetcode.com/problems/chalkboard-xor-game](https://leetcode.com/problems/chalkboard-xor-game)|
|[CountBits](bit_manipulation/CountBits.java)|[https://leetcode.com/problems/counting-bits](https://leetcode.com/problems/counting-bits)|
|[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/)|
|[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)|
|[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)|
|[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/)|
|[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/)|
|[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/)|
|[MaximumXORForEachQuery](bit_manipulation/MaximumXORForEachQuery.java)|[https://leetcode.com/problems/maximum-xor-for-each-query/](https://leetcode.com/problems/maximum-xor-for-each-query/)|
|[MinimizeXOR](bit_manipulation/MinimizeXOR.java)|[https://leetcode.com/problems/minimize-xor](https://leetcode.com/problems/minimize-xor)|
|[MinimumArrayEnd](bit_manipulation/MinimumArrayEnd.java)|[https://leetcode.com/problems/minimum-array-end](https://leetcode.com/problems/minimum-array-end)|
|[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/)|
|[ReverseBits](bit_manipulation/ReverseBits.java)|[https://leetcode.com/problems/reverse-bits](https://leetcode.com/problems/reverse-bits)|
|[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)|
|[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)|
|[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)|
|[XORQueriesOfSubarray](bit_manipulation/XORQueriesOfSubarray.java)|[https://leetcode.com/problems/xor-queries-of-a-subarray/](https://leetcode.com/problems/xor-queries-of-a-subarray/)|
|Total|19|
#### Concurrency
|Solution|Leetcode Link|
|--------|-----------|
|[PrintInOrder](concurrency/PrintInOrder.java)|[https://leetcode.com/problems/print-in-order](https://leetcode.com/problems/print-in-order)|
|Total|1|
#### Design
|Solution|Leetcode Link|
|--------|-----------|
|[ApplyDesignEveryNOrders](design/ApplyDesignEveryNOrders.java)|[https://leetcode.com/problems/apply-discount-every-n-orders](https://leetcode.com/problems/apply-discount-every-n-orders)|
|[DesignAnOrderedStream](design/DesignAnOrderedStream.java)|[https://leetcode.com/problems/design-an-ordered-stream/](https://leetcode.com/problems/design-an-ordered-stream/)|
|[DesignFacebook](design/DesignFacebook.java)|-|
|[DesignMemoryAllocator](design/DesignMemoryAllocator.java)|[https://leetcode.com/problems/design-memory-allocator](https://leetcode.com/problems/design-memory-allocator)|
|[DesignParkingSystem](design/DesignParkingSystem.java)|[https://leetcode.com/problems/design-parking-system](https://leetcode.com/problems/design-parking-system)|
|[DesignSpreadsheet](design/DesignSpreadsheet.java)|[https://leetcode.com/problems/design-spreadsheet](https://leetcode.com/problems/design-spreadsheet)|
|[DesignUndergroundSystem](design/DesignUndergroundSystem.java)|[https://leetcode.com/problems/design-underground-system](https://leetcode.com/problems/design-underground-system)|
|[FrequencyTracker](design/FrequencyTracker.java)|[https://leetcode.com/problems/frequency-tracker](https://leetcode.com/problems/frequency-tracker)|
|[ImplementRouter.kt](design/ImplementRouter.kt)|[https://leetcode.com/problems/implement-router/](https://leetcode.com/problems/implement-router/)|
|[IteratorForCombination](design/IteratorForCombination.java)|[https://leetcode.com/problems/iterator-for-combination](https://leetcode.com/problems/iterator-for-combination)|
|[LongestUploadedPrefix](design/LongestUploadedPrefix.java)|[https://leetcode.com/problems/longest-uploaded-prefix](https://leetcode.com/problems/longest-uploaded-prefix)|
|Total|11|
#### Dp
|Solution|Leetcode Link|
|--------|-----------|
|[AllPossibleFBT](dp/AllPossibleFBT.java)|-|
|[ArithmeticSlices](dp/ArithmeticSlices.java)|[https://leetcode.com/problems/arithmetic-slices/](https://leetcode.com/problems/arithmetic-slices/)|
|[ArithmeticSlices2](dp/ArithmeticSlices2.java)|[https://leetcode.com/problems/arithmetic-slices-ii-subsequence](https://leetcode.com/problems/arithmetic-slices-ii-subsequence)|
|[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)|
|[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)|
|[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)|
|[ChampagneTower](dp/ChampagneTower.java)|[https://leetcode.com/problems/champagne-tower](https://leetcode.com/problems/champagne-tower)|
|[CheapestFlightsWithinKStops](dp/CheapestFlightsWithinKStops.java)|[https://leetcode.com/problems/cheapest-flights-within-k-stops](https://leetcode.com/problems/cheapest-flights-within-k-stops)|
|[CherryPickup2](dp/CherryPickup2.java)|-|
|[ClimbingStairs](dp/ClimbingStairs.java)|[https://leetcode.com/problems/climbing-stairs](https://leetcode.com/problems/climbing-stairs)|
|[CoinChange](dp/CoinChange.java)|-|
|[CoinChange2](dp/CoinChange2.java)|-|
|[CombinationSum4](dp/CombinationSum4.java)|[https://leetcode.com/problems/combination-sum-iv](https://leetcode.com/problems/combination-sum-iv)|
|[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)|
|[CountAllPossibleRoutes](dp/CountAllPossibleRoutes.java)|[https://leetcode.com/problems/count-all-possible-routes](https://leetcode.com/problems/count-all-possible-routes)|
|[CountingBits](dp/CountingBits.java)|-|
|[CountNumberOfSpecialSubsequences](dp/CountNumberOfSpecialSubsequences.java)|[https://leetcode.com/problems/count-number-of-special-subsequences](https://leetcode.com/problems/count-number-of-special-subsequences)|
|[CountNumbersWithUniqueDigits](dp/CountNumbersWithUniqueDigits.java)|[https://leetcode.com/problems/count-numbers-with-unique-digits](https://leetcode.com/problems/count-numbers-with-unique-digits)|
|[CountOfIntegers](dp/CountOfIntegers.java)|-|
|[CountSpecialIntegers](dp/CountSpecialIntegers.java)|[https://leetcode.com/problems/count-special-integers](https://leetcode.com/problems/count-special-integers)|
|[CountSubmatricesWithAllOnes](dp/CountSubmatricesWithAllOnes.java)|[https://leetcode.com/problems/count-square-submatrices-with-all-ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones)|
|[CountTheNumberOfPowerfulIntegers](dp/CountTheNumberOfPowerfulIntegers.java)|[https://leetcode.com/problems/count-the-number-of-powerful-integers](https://leetcode.com/problems/count-the-number-of-powerful-integers)|
|[CountVowelStrings](dp/CountVowelStrings.java)|-|
|[CountWaysToBuildGoodStrings](dp/CountWaysToBuildGoodStrings.java)|[https://leetcode.com/problems/count-ways-to-build-good-strings](https://leetcode.com/problems/count-ways-to-build-good-strings)|
|[DecodeWays](dp/DecodeWays.java)|[https://leetcode.com/problems/decode-ways](https://leetcode.com/problems/decode-ways)|
|[ExtraCharactersInAString](dp/ExtraCharactersInAString.java)|[https://leetcode.com/problems/extra-characters-in-a-string](https://leetcode.com/problems/extra-characters-in-a-string)|
|[FindMaxInGeneratedArray](dp/FindMaxInGeneratedArray.java)|-|
|[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/)|
|[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/)|
|[FreedomTrail](dp/FreedomTrail.java)|[https://leetcode.com/problems/freedom-trail](https://leetcode.com/problems/freedom-trail)|
|[FrogJump](dp/FrogJump.java)|[https://leetcode.com/problems/frog-jump](https://leetcode.com/problems/frog-jump)|
|[HouseRobber](dp/HouseRobber.java)|[https://leetcode.com/problems/house-robber](https://leetcode.com/problems/house-robber)|
|[HouseRobberCircular](dp/HouseRobberCircular.java)|[https://leetcode.com/problems/house-robber-ii](https://leetcode.com/problems/house-robber-ii)|
|[HouseRobberIII](dp/HouseRobberIII.java)|[https://leetcode.com/problems/house-robber-iii](https://leetcode.com/problems/house-robber-iii)|
|[IntegerBreak](dp/IntegerBreak.java)|-|
|[InterleavingString](dp/InterleavingString.java)|[https://leetcode.com/problems/interleaving-string](https://leetcode.com/problems/interleaving-string)|
|[JumpGame](dp/JumpGame.java)|-|
|[JumpGame2](dp/JumpGame2.java)|-|
|[KInversePairsArray](dp/KInversePairsArray.java)|[https://leetcode.com/problems/k-inverse-pairs-array/submissions](https://leetcode.com/problems/k-inverse-pairs-array/submissions)|
|[KnightDialer](dp/KnightDialer.java)|[https://leetcode.com/problems/knight-dialer/](https://leetcode.com/problems/knight-dialer/)|
|[LargestDivisibleSubset](dp/LargestDivisibleSubset.java)|[https://leetcode.com/problems/largest-divisible-subset](https://leetcode.com/problems/largest-divisible-subset)|
|[LargestSumOfAverages](dp/LargestSumOfAverages.java)|[https://leetcode.com/problems/largest-sum-of-averages](https://leetcode.com/problems/largest-sum-of-averages)|
|[LongestCommonSubequence](dp/LongestCommonSubequence.java)|[https://leetcode.com/problems/longest-common-subsequence](https://leetcode.com/problems/longest-common-subsequence)|
|[LongestIdealSubsequence](dp/LongestIdealSubsequence.java)|[https://leetcode.com/problems/longest-ideal-subsequence](https://leetcode.com/problems/longest-ideal-subsequence)|
|[LongestIncreasingPathInAMatrix](dp/LongestIncreasingPathInAMatrix.java)|[https://leetcode.com/problems/longest-increasing-path-in-a-matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix)|
|[LongestIncreasingSubsequence](dp/LongestIncreasingSubsequence.java)|[https://leetcode.com/problems/longest-increasing-subsequence](https://leetcode.com/problems/longest-increasing-subsequence)|
|[LongestPalindromicSubsequence](dp/LongestPalindromicSubsequence.java)|[https://leetcode.com/problems/longest-palindromic-subsequence](https://leetcode.com/problems/longest-palindromic-subsequence)|
|[LongestStringChain](dp/LongestStringChain.java)|[https://leetcode.com/problems/longest-string-chain](https://leetcode.com/problems/longest-string-chain)|
|[MaxEnergyBoostFrom2Drinks](dp/MaxEnergyBoostFrom2Drinks.java)|[https://leetcode.com/problems/maximum-energy-boost-from-two-drinks/](https://leetcode.com/problems/maximum-energy-boost-from-two-drinks/)|
|[MaximalSquare](dp/MaximalSquare.java)|[https://leetcode.com/problems/maximal-square/](https://leetcode.com/problems/maximal-square/)|
|[MaximumAbsoluteSumOfAnySubarray](dp/MaximumAbsoluteSumOfAnySubarray.java)|[https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray/](https://leetcode.com/problems/maximum-absolute-sum-of-any-subarray/)|
|[MaximumDotProductOf2Subsequences](dp/MaximumDotProductOf2Subsequences.java)|[https://leetcode.com/problems/max-dot-product-of-two-subsequences](https://leetcode.com/problems/max-dot-product-of-two-subsequences)|
|[MaximumEarningsFromTaxi](dp/MaximumEarningsFromTaxi.java)|[https://leetcode.com/problems/maximum-earnings-from-taxi](https://leetcode.com/problems/maximum-earnings-from-taxi)|
|[MaximumMultiplicationScore](dp/MaximumMultiplicationScore.java)|[https://leetcode.com/problems/maximum-multiplication-score](https://leetcode.com/problems/maximum-multiplication-score)|
|[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)|
|[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)|
|[MaximumProductSubarray](dp/MaximumProductSubarray.java)|-|
|[MaximumProfitInJobScheduling](dp/MaximumProfitInJobScheduling.java)|[https://leetcode.com/problems/maximum-profit-in-job-scheduling](https://leetcode.com/problems/maximum-profit-in-job-scheduling)|
|[MaximumSumCircularSubArray](dp/MaximumSumCircularSubArray.java)|[https://leetcode.com/problems/maximum-sum-circular-subarray/](https://leetcode.com/problems/maximum-sum-circular-subarray/)|
|[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)|
|[MinCostClimbingStairs](dp/MinCostClimbingStairs.java)|[https://leetcode.com/problems/min-cost-climbing-stairs](https://leetcode.com/problems/min-cost-climbing-stairs)|
|[MinimumCostForTickets](dp/MinimumCostForTickets.java)|[https://leetcode.com/problems/minimum-cost-for-tickets/](https://leetcode.com/problems/minimum-cost-for-tickets/)|
|[MinimumCostToCutAStick](dp/MinimumCostToCutAStick.java)|[https://leetcode.com/problems/minimum-cost-to-cut-a-stick/](https://leetcode.com/problems/minimum-cost-to-cut-a-stick/)|
|[MinimumFallingPathSum](dp/MinimumFallingPathSum.java)|[https://leetcode.com/problems/minimum-falling-path-sum](https://leetcode.com/problems/minimum-falling-path-sum)|
|[MinimumFallingPathSum2](dp/MinimumFallingPathSum2.java)|[https://leetcode.com/problems/minimum-falling-path-sum-ii](https://leetcode.com/problems/minimum-falling-path-sum-ii)|
|[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)|
|[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)|
|[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)|
|[MinimumTimeToMakeRopeColorful](dp/MinimumTimeToMakeRopeColorful.java)|[https://leetcode.com/problems/minimum-time-to-make-rope-colorful](https://leetcode.com/problems/minimum-time-to-make-rope-colorful)|
|[MinimumTotalDistanceTravelled](dp/MinimumTotalDistanceTravelled.java)|[https://leetcode.com/problems/minimum-total-distance-traveled](https://leetcode.com/problems/minimum-total-distance-traveled)|
|[MinPathSum](dp/MinPathSum.java)|[https://leetcode.com/problems/minimum-path-sum/](https://leetcode.com/problems/minimum-path-sum/)|
|[MinSteps](dp/MinSteps.java)|[https://leetcode.com/problems/2-keys-keyboard/](https://leetcode.com/problems/2-keys-keyboard/)|
|[NonNegativeIntegersWithoutConsecutiveOnes](dp/NonNegativeIntegersWithoutConsecutiveOnes.java)|[https://leetcode.com/problems/non-negative-integers-without-consecutive-ones](https://leetcode.com/problems/non-negative-integers-without-consecutive-ones)|
|[NumberOfArithmeticSlices](dp/NumberOfArithmeticSlices.java)|[https://leetcode.com/problems/arithmetic-slices/](https://leetcode.com/problems/arithmetic-slices/)|
|[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/)|
|[NumberOfDigitOne](dp/NumberOfDigitOne.java)|[https://leetcode.com/problems/number-of-digit-one/](https://leetcode.com/problems/number-of-digit-one/)|
|[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)|
|[NumberOfWaysToSelectBuildings](dp/NumberOfWaysToSelectBuildings.java)|[https://leetcode.com/problems/number-of-ways-to-select-buildings](https://leetcode.com/problems/number-of-ways-to-select-buildings)|
|[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)|
|[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)|
|[NumbersWithRepeatedDigits](dp/NumbersWithRepeatedDigits.java)|[https://leetcode.com/problems/numbers-with-repeated-digits](https://leetcode.com/problems/numbers-with-repeated-digits)|
|[NumOfTeams](dp/NumOfTeams.java)|[https://leetcode.com/problems/count-number-of-teams](https://leetcode.com/problems/count-number-of-teams)|
|[OnesAndZeroes](dp/OnesAndZeroes.java)|[https://leetcode.com/problems/ones-and-zeroes/](https://leetcode.com/problems/ones-and-zeroes/)|
|[OutOfBoundaryPaths](dp/OutOfBoundaryPaths.java)|[https://leetcode.com/problems/out-of-boundary-paths/](https://leetcode.com/problems/out-of-boundary-paths/)|
|[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/)|
|[PartitionArrayForMaximumSum](dp/PartitionArrayForMaximumSum.java)|[https://leetcode.com/problems/partition-array-for-maximum-sum](https://leetcode.com/problems/partition-array-for-maximum-sum)|
|[PartitionEqualSubsetSum](dp/PartitionEqualSubsetSum.java)|[https://leetcode.com/problems/partition-equal-subset-sum](https://leetcode.com/problems/partition-equal-subset-sum)|
|[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/)|
|[ProfitableSchemes](dp/ProfitableSchemes.java)|[https://leetcode.com/problems/profitable-schemes](https://leetcode.com/problems/profitable-schemes)|
|[RestoreTheArray](dp/RestoreTheArray.java)|[https://leetcode.com/problems/restore-the-array](https://leetcode.com/problems/restore-the-array)|
|[SolvingQuestionsWithBrainPower](dp/SolvingQuestionsWithBrainPower.java)|[https://leetcode.com/problems/solving-questions-with-brainpower/](https://leetcode.com/problems/solving-questions-with-brainpower/)|
|[StoneGame](dp/StoneGame.java)|[https://leetcode.com/problems/stone-game/](https://leetcode.com/problems/stone-game/)|
|[StoneGame2](dp/StoneGame2.java)|[https://leetcode.com/problems/stone-game-ii/](https://leetcode.com/problems/stone-game-ii/)|
|[StoneGame3](dp/StoneGame3.java)|[https://leetcode.com/problems/stone-game-iii](https://leetcode.com/problems/stone-game-iii)|
|[StrangePrinter](dp/StrangePrinter.java)|[https://leetcode.com/problems/strange-printer/](https://leetcode.com/problems/strange-printer/)|
|[StudentAttendanceRecord2](dp/StudentAttendanceRecord2.java)|[https://leetcode.com/problems/student-attendance-record-ii/](https://leetcode.com/problems/student-attendance-record-ii/)|
|[TargetSum](dp/TargetSum.java)|[https://leetcode.com/problems/target-sum/](https://leetcode.com/problems/target-sum/)|
|[Triangle](dp/Triangle.java)|[https://leetcode.com/problems/triangle](https://leetcode.com/problems/triangle)|
|[UncrossedLines](dp/UncrossedLines.java)|[https://leetcode.com/problems/uncrossed-lines](https://leetcode.com/problems/uncrossed-lines)|
|[UniquePaths](dp/UniquePaths.java)|[https://leetcode.com/problems/unique-paths/](https://leetcode.com/problems/unique-paths/)|
|[UniquePaths2](dp/UniquePaths2.java)|[https://leetcode.com/problems/unique-paths-ii](https://leetcode.com/problems/unique-paths-ii)|
|[WiggleSubsequence](dp/WiggleSubsequence.java)|[https://leetcode.com/problems/wiggle-subsequence](https://leetcode.com/problems/wiggle-subsequence)|
|Total|102|
#### Graph
|Solution|Leetcode Link|
|--------|-----------|
|[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)|
|[AllOne](graph/AllOne.java)|[https://leetcode.com/problems/all-oone-data-structure](https://leetcode.com/problems/all-oone-data-structure)|
|[AllPathsFromSourceToTarget](graph/AllPathsFromSourceToTarget.java)|[https://leetcode.com/problems/all-paths-from-source-to-target](https://leetcode.com/problems/all-paths-from-source-to-target)|
|[BuildAMatrixWithConditions](graph/BuildAMatrixWithConditions.java)|[https://leetcode.com/problems/build-a-matrix-with-conditions/](https://leetcode.com/problems/build-a-matrix-with-conditions/)|
|[CenterOfStarGraph](graph/CenterOfStarGraph.java)|[https://leetcode.com/problems/find-center-of-star-graph](https://leetcode.com/problems/find-center-of-star-graph)|
|[CloneGraph](graph/CloneGraph.java)|[https://leetcode.com/problems/clone-graph](https://leetcode.com/problems/clone-graph)|
|[CourseSchedule](graph/CourseSchedule.java)|[https://leetcode.com/problems/course-schedule](https://leetcode.com/problems/course-schedule)|
|[CourseSchedule2](graph/CourseSchedule2.java)|[https://leetcode.com/problems/course-schedule-ii](https://leetcode.com/problems/course-schedule-ii)|
|[CourseSchedule4](graph/CourseSchedule4.java)|[https://leetcode.com/problems/course-schedule-iv](https://leetcode.com/problems/course-schedule-iv)|
|[DetonateMaximumBombs](graph/DetonateMaximumBombs.java)|[https://leetcode.com/problems/detonate-the-maximum-bombs](https://leetcode.com/problems/detonate-the-maximum-bombs)|
|[EvaluateDivision](graph/EvaluateDivision.java)|[https://leetcode.com/problems/evaluate-division](https://leetcode.com/problems/evaluate-division)|
|[FindAllGroupsOfFarmland](graph/FindAllGroupsOfFarmland.java)|[https://leetcode.com/problems/find-all-groups-of-farmland](https://leetcode.com/problems/find-all-groups-of-farmland)|
|[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/)|
|[FindIfPathExistsInGraph](graph/FindIfPathExistsInGraph.java)|[https://leetcode.com/problems/find-if-path-exists-in-graph/](https://leetcode.com/problems/find-if-path-exists-in-graph/)|
|[FindTheTownJudge](graph/FindTheTownJudge.java)|[https://leetcode.com/problems/find-the-town-judge](https://leetcode.com/problems/find-the-town-judge)|
|[FlowerPlanting](graph/FlowerPlanting.java)|[https://leetcode.com/problems/flower-planting-with-no-adjacent](https://leetcode.com/problems/flower-planting-with-no-adjacent)|
|[HasValidPath](graph/HasValidPath.java)|[https://leetcode.com/problems/find-if-path-exists-in-graph](https://leetcode.com/problems/find-if-path-exists-in-graph)|
|[IsBipartite](graph/IsBipartite.java)|[https://leetcode.com/problems/is-graph-bipartite](https://leetcode.com/problems/is-graph-bipartite)|
|[IslandPerimeter](graph/IslandPerimeter.java)|[https://leetcode.com/problems/island-perimeter](https://leetcode.com/problems/island-perimeter)|
|[KeysAndRooms](graph/KeysAndRooms.java)|[https://leetcode.com/problems/keys-and-rooms](https://leetcode.com/problems/keys-and-rooms)|
|[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)|
|[LongestCycleInAGraph](graph/LongestCycleInAGraph.java)|[https://leetcode.com/problems/longest-cycle-in-a-graph/](https://leetcode.com/problems/longest-cycle-in-a-graph/)|
|[LongestPathWithDifferentAdjacentCharacters](graph/LongestPathWithDifferentAdjacentCharacters.java)|[https://leetcode.com/problems/longest-path-with-different-adjacent-characters/](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/)|
|[LoudAndRich](graph/LoudAndRich.java)|[https://leetcode.com/problems/loud-and-rich](https://leetcode.com/problems/loud-and-rich)|
|[MaximalNetworkRank](graph/MaximalNetworkRank.java)|[https://leetcode.com/problems/maximal-network-rank/](https://leetcode.com/problems/maximal-network-rank/)|
|[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)|
|[MaxTotalImportanceOfRoads](graph/MaxTotalImportanceOfRoads.java)|[https://leetcode.com/problems/maximum-total-importance-of-roads](https://leetcode.com/problems/maximum-total-importance-of-roads)|
|[MinimumGeneticMutation](graph/MinimumGeneticMutation.java)|[https://leetcode.com/problems/minimum-genetic-mutation](https://leetcode.com/problems/minimum-genetic-mutation)|
|[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/)|
|[MinimumObstacleRemovalToReachCorner](graph/MinimumObstacleRemovalToReachCorner.java)|[https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner](https://leetcode.com/problems/minimum-obstacle-removal-to-reach-corner)|
|[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/)|
|[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)|
|[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/)|
|[PathWithMaximumProbability](graph/PathWithMaximumProbability.java)|[https://leetcode.com/problems/path-with-maximum-probability](https://leetcode.com/problems/path-with-maximum-probability)|
|[PathWithMinimumEffort](graph/PathWithMinimumEffort.java)|[https://leetcode.com/problems/path-with-minimum-effort](https://leetcode.com/problems/path-with-minimum-effort)|
|[ReconstructItinerary](graph/ReconstructItinerary.java)|[https://leetcode.com/problems/reconstruct-itinerary](https://leetcode.com/problems/reconstruct-itinerary)|
|[RedundantConnections](graph/RedundantConnections.java)|[https://leetcode.com/problems/redundant-connection](https://leetcode.com/problems/redundant-connection)|
|[RegionsCutBySlashes](graph/RegionsCutBySlashes.java)|[https://leetcode.com/problems/regions-cut-by-slashes](https://leetcode.com/problems/regions-cut-by-slashes)|
|[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/)|
|[RestoreTheArrayFromAdjacentPairs](graph/RestoreTheArrayFromAdjacentPairs.java)|[https://leetcode.com/problems/restore-the-array-from-adjacent-pairs/](https://leetcode.com/problems/restore-the-array-from-adjacent-pairs/)|
|[SatisfiabilityOfEquations](graph/SatisfiabilityOfEquations.java)|[https://leetcode.com/problems/satisfiability-of-equality-equations/](https://leetcode.com/problems/satisfiability-of-equality-equations/)|
|[ShortestBridge](graph/ShortestBridge.java)|[https://leetcode.com/problems/shortest-bridge](https://leetcode.com/problems/shortest-bridge)|
|[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)|
|[ShortestPathInABinaryGraph](graph/ShortestPathInABinaryGraph.java)|[https://leetcode.com/problems/shortest-path-in-binary-matrix/](https://leetcode.com/problems/shortest-path-in-binary-matrix/)|
|[ShortestPathVisitingAllNodes](graph/ShortestPathVisitingAllNodes.java)|[https://leetcode.com/problems/shortest-path-visiting-all-nodes](https://leetcode.com/problems/shortest-path-visiting-all-nodes)|
|[TimeNeededToInform](graph/TimeNeededToInform.java)|[https://leetcode.com/problems/time-needed-to-inform-all-employees](https://leetcode.com/problems/time-needed-to-inform-all-employees)|
|[ValidArrangementOfPairs](graph/ValidArrangementOfPairs.java)|[https://leetcode.com/problems/valid-arrangement-of-pairs](https://leetcode.com/problems/valid-arrangement-of-pairs)|
|[WaterAndJugProblem](graph/WaterAndJugProblem.java)|[https://leetcode.com/problems/water-and-jug-problem](https://leetcode.com/problems/water-and-jug-problem)|
|Total|48|
#### Heap
|Solution|Leetcode Link|
|--------|-----------|
|[DistantBarcodes](heap/DistantBarcodes.java)|[https://leetcode.com/problems/distant-barcodes](https://leetcode.com/problems/distant-barcodes)|
|[FarthestBuildingYouCanReach](heap/FarthestBuildingYouCanReach.java)|[https://leetcode.com/problems/furthest-building-you-can-reach](https://leetcode.com/problems/furthest-building-you-can-reach)|
|[FoodRatings](heap/FoodRatings.java)|[https://leetcode.com/problems/design-a-food-rating-system](https://leetcode.com/problems/design-a-food-rating-system)|
|[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)|
|[MaximalScoreAfterApplyingKOperations](heap/MaximalScoreAfterApplyingKOperations.java)|[https://leetcode.com/problems/maximal-score-after-applying-k-operations](https://leetcode.com/problems/maximal-score-after-applying-k-operations)|
|[MaximumProductsAfterKIncrements](heap/MaximumProductsAfterKIncrements.java)|[https://leetcode.com/problems/maximum-product-after-k-increments](https://leetcode.com/problems/maximum-product-after-k-increments)|
|[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/)|
|[MaxScoreFromRemovingStones](heap/MaxScoreFromRemovingStones.java)|[https://leetcode.com/problems/maximum-score-from-removing-stones](https://leetcode.com/problems/maximum-score-from-removing-stones)|
|[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)|
|[MeetingRooms3](heap/MeetingRooms3.java)|[https://leetcode.com/problems/meeting-rooms-iii](https://leetcode.com/problems/meeting-rooms-iii)|
|[MinimumDeviationInArray](heap/MinimumDeviationInArray.java)|[https://leetcode.com/problems/minimize-deviation-in-array](https://leetcode.com/problems/minimize-deviation-in-array)|
|[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/)|
|[MinimumOperationsToHaveHalfArraySum](heap/MinimumOperationsToHaveHalfArraySum.java)|[https://leetcode.com/problems/minimum-operations-to-halve-array-sum](https://leetcode.com/problems/minimum-operations-to-halve-array-sum)|
|[MinStones](heap/MinStones.java)|[https://leetcode.com/problems/remove-stones-to-minimize-the-total](https://leetcode.com/problems/remove-stones-to-minimize-the-total)|
|[NumberContainerSystem](heap/NumberContainerSystem.java)|[https://leetcode.com/problems/design-a-number-container-system](https://leetcode.com/problems/design-a-number-container-system)|
|[ReduceArrayToHalf](heap/ReduceArrayToHalf.java)|[https://leetcode.com/problems/reduce-array-size-to-the-half](https://leetcode.com/problems/reduce-array-size-to-the-half)|
|[ReorganizeStrings](heap/ReorganizeStrings.java)|[https://leetcode.com/problems/reorganize-string/](https://leetcode.com/problems/reorganize-string/)|
|[SeatReservation](heap/SeatReservation.java)|[https://leetcode.com/problems/seat-reservation-manager](https://leetcode.com/problems/seat-reservation-manager)|
|[SlidingWindowMaximum](heap/SlidingWindowMaximum.java)|[https://leetcode.com/problems/sliding-window-maximum](https://leetcode.com/problems/sliding-window-maximum)|
|[SlidingWindowMedian](heap/SlidingWindowMedian.java)|[https://leetcode.com/problems/sliding-window-median/](https://leetcode.com/problems/sliding-window-median/)|
|[StoneGame6](heap/StoneGame6.java)|[https://leetcode.com/problems/stone-game-vi](https://leetcode.com/problems/stone-game-vi)|
|[TaskScheduler](heap/TaskScheduler.java)|[https://leetcode.com/problems/task-scheduler](https://leetcode.com/problems/task-scheduler)|
|[TotalCostToHireKWorkers](heap/TotalCostToHireKWorkers.java)|[https://leetcode.com/problems/total-cost-to-hire-k-workers](https://leetcode.com/problems/total-cost-to-hire-k-workers)|
|Total|23|
#### Linked List
|Solution|Leetcode Link|
|--------|-----------|
|[CopyListWithRandomPointer](linked_list/CopyListWithRandomPointer.java)|[https://leetcode.com/problems/copy-list-with-random-pointer](https://leetcode.com/problems/copy-list-with-random-pointer)|
|[DeleteDuplicates](linked_list/DeleteDuplicates.java)