├── .gitignore ├── README.md ├── README_OLD.md ├── configs.json ├── core ├── 3Sum │ ├── 3Sum.java │ └── 3Sum.py ├── 4ueAj6 │ ├── 4ueAj6.java │ └── 4ueAj6.py ├── AddDigits │ ├── AddDigits.java │ └── AddDigits.py ├── AddStrings │ ├── AddStrings.java │ └── AddStrings.py ├── AddTwoNumbers │ ├── AddTwoNumbers.java │ └── AddTwoNumbers.py ├── AddTwoNumbersII │ ├── AddTwoNumbersII.java │ └── AddTwoNumbersII.py ├── AllElementsInTwoBinarySearchTrees │ ├── AllElementsInTwoBinarySearchTrees.java │ └── AllElementsInTwoBinarySearchTrees.py ├── AllOoneDataStructure │ ├── AllOoneDataStructure.java │ └── AllOoneDataStructure.py ├── ArrayOfDoubledPairs │ ├── ArrayOfDoubledPairs.java │ └── ArrayOfDoubledPairs.py ├── BalancedBinaryTree │ ├── BalancedBinaryTree.java │ └── BalancedBinaryTree.py ├── Base7 │ ├── Base7.java │ └── Base7.py ├── BaseballGame │ ├── BaseballGame.java │ └── BaseballGame.py ├── BasicCalculatorII │ ├── BasicCalculatorII.java │ └── BasicCalculatorII.py ├── BestTimeToBuyAndSellStock │ ├── BestTimeToBuyAndSellStock.java │ └── BestTimeToBuyAndSellStock.py ├── BestTimeToBuyAndSellStockII │ ├── BestTimeToBuyAndSellStockII.java │ └── BestTimeToBuyAndSellStockII.py ├── BestTimeToBuyAndSellStockIII │ ├── BestTimeToBuyAndSellStockIII.java │ └── BestTimeToBuyAndSellStockIII.py ├── BinaryNumberWithAlternatingBits │ ├── BinaryNumberWithAlternatingBits.java │ └── BinaryNumberWithAlternatingBits.py ├── BinarySearch │ ├── BinarySearch.java │ └── BinarySearch.py ├── BinaryTreeInorderTraversal │ ├── BinaryTreeInorderTraversal.java │ └── BinaryTreeInorderTraversal.py ├── BinaryTreeLevelOrderTraversal │ ├── BinaryTreeLevelOrderTraversal.java │ └── BinaryTreeLevelOrderTraversal.py ├── BinaryTreeMaximumPathSum │ ├── BinaryTreeMaximumPathSum.java │ └── BinaryTreeMaximumPathSum.py ├── BinaryTreePostorderTraversal │ ├── BinaryTreePostorderTraversal.java │ └── BinaryTreePostorderTraversal.py ├── BinaryTreePreorderTraversal │ ├── BinaryTreePreorderTraversal.java │ └── BinaryTreePreorderTraversal.py ├── BinaryTreeRightSideView │ ├── BinaryTreeRightSideView.java │ └── BinaryTreeRightSideView.py ├── BinaryTreeZigzagLevelOrderTraversal │ ├── BinaryTreeZigzagLevelOrderTraversal.java │ └── BinaryTreeZigzagLevelOrderTraversal.py ├── CanIWin │ ├── CanIWin.java │ └── CanIWin.py ├── Candy │ ├── Candy.java │ └── Candy.py ├── CatAndMouseII │ ├── CatAndMouseII.java │ └── CatAndMouseII.py ├── CheckCompletenessOfABinaryTree │ ├── CheckCompletenessOfABinaryTree.java │ └── CheckCompletenessOfABinaryTree.py ├── ClimbingStairs │ ├── ClimbingStairs.java │ └── ClimbingStairs.py ├── CoinChange │ ├── CoinChange.java │ └── CoinChange.py ├── CoinChange2 │ ├── CoinChange2.java │ └── CoinChange2.py ├── CombinationSum │ ├── CombinationSum.java │ └── CombinationSum.py ├── CompareVersionNumbers │ ├── CompareVersionNumbers.java │ └── CompareVersionNumbers.py ├── ComplexNumberMultiplication │ ├── ComplexNumberMultiplication.java │ └── ComplexNumberMultiplication.py ├── ConstructBinaryTreeFromPreorderAndInorderTraversal │ ├── ConstructBinaryTreeFromPreorderAndInorderTraversal.java │ └── ConstructBinaryTreeFromPreorderAndInorderTraversal.py ├── ConstructStringFromBinaryTree │ ├── ConstructStringFromBinaryTree.java │ └── ConstructStringFromBinaryTree.py ├── ContainerWithMostWater │ ├── ContainerWithMostWater.java │ └── ContainerWithMostWater.py ├── CopyListWithRandomPointer │ ├── CopyListWithRandomPointer.java │ └── CopyListWithRandomPointer.py ├── CountDifferentPalindromicSubsequences │ ├── CountDifferentPalindromicSubsequences.java │ └── CountDifferentPalindromicSubsequences.py ├── CountNodesWithTheHighestScore │ ├── CountNodesWithTheHighestScore.java │ └── CountNodesWithTheHighestScore.py ├── CountNumberOfMaximumBitwiseOrSubsets │ ├── CountNumberOfMaximumBitwiseOrSubsets.java │ └── CountNumberOfMaximumBitwiseOrSubsets.py ├── CountNumbersWithUniqueDigits │ ├── CountNumbersWithUniqueDigits.java │ └── CountNumbersWithUniqueDigits.py ├── CountPrimes │ ├── CountPrimes.java │ └── CountPrimes.py ├── CourseSchedule │ ├── CourseSchedule.java │ └── CourseSchedule.py ├── CutOffTreesForGolfEvent │ ├── CutOffTreesForGolfEvent.java │ └── CutOffTreesForGolfEvent.py ├── DailyTemperatures │ ├── DailyTemperatures.java │ └── DailyTemperatures.py ├── DecodeString │ ├── DecodeString.java │ └── DecodeString.py ├── DecodeWays │ ├── DecodeWays.java │ └── DecodeWays.py ├── DeleteColumnsToMakeSorted │ ├── DeleteColumnsToMakeSorted.java │ └── DeleteColumnsToMakeSorted.py ├── DeleteNodeInABst │ ├── DeleteNodeInABst.java │ └── DeleteNodeInABst.py ├── DiameterOfBinaryTree │ ├── DiameterOfBinaryTree.java │ └── DiameterOfBinaryTree.py ├── DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof │ ├── DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.java │ └── DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.py ├── DungeonGame │ ├── DungeonGame.java │ └── DungeonGame.py ├── DuplicateZeros │ ├── DuplicateZeros.java │ └── DuplicateZeros.py ├── EditDistance │ ├── EditDistance.java │ └── EditDistance.py ├── EncodeAndDecodeTinyurl │ ├── EncodeAndDecodeTinyurl.java │ └── EncodeAndDecodeTinyurl.py ├── ErChaShuDeJingXiangLcof │ ├── ErChaShuDeJingXiangLcof.java │ └── ErChaShuDeJingXiangLcof.py ├── ErChaSouSuoShuDeDiKdaJieDianLcof │ ├── ErChaSouSuoShuDeDiKdaJieDianLcof.java │ └── ErChaSouSuoShuDeDiKdaJieDianLcof.py ├── ErChaSouSuoShuYuShuangXiangLianBiaoLcof │ ├── ErChaSouSuoShuYuShuangXiangLianBiaoLcof.java │ └── ErChaSouSuoShuYuShuangXiangLianBiaoLcof.py ├── ErWeiShuZuZhongDeChaZhaoLcof │ ├── ErWeiShuZuZhongDeChaZhaoLcof.java │ └── ErWeiShuZuZhongDeChaZhaoLcof.py ├── FactorialTrailingZeroes │ ├── FactorialTrailingZeroes.java │ └── FactorialTrailingZeroes.py ├── FindAllDuplicatesInAnArray │ ├── FindAllDuplicatesInAnArray.java │ └── FindAllDuplicatesInAnArray.py ├── FindAllNumbersDisappearedInAnArray │ ├── FindAllNumbersDisappearedInAnArray.java │ └── FindAllNumbersDisappearedInAnArray.py ├── FindAndReplacePattern │ ├── FindAndReplacePattern.java │ └── FindAndReplacePattern.py ├── FindBottomLeftTreeValue │ ├── FindBottomLeftTreeValue.java │ └── FindBottomLeftTreeValue.py ├── FindClosestLcci │ ├── FindClosestLcci.java │ └── FindClosestLcci.py ├── FindDuplicateSubtrees │ ├── FindDuplicateSubtrees.java │ └── FindDuplicateSubtrees.py ├── FindFirstAndLastPositionOfElementInSortedArray │ ├── FindFirstAndLastPositionOfElementInSortedArray.java │ └── FindFirstAndLastPositionOfElementInSortedArray.py ├── FindGoodDaysToRobTheBank │ ├── FindGoodDaysToRobTheBank.java │ └── FindGoodDaysToRobTheBank.py ├── FindKThSmallestPairDistance │ ├── FindKThSmallestPairDistance.java │ └── FindKThSmallestPairDistance.py ├── FindLargestValueInEachTreeRow │ ├── FindLargestValueInEachTreeRow.java │ └── FindLargestValueInEachTreeRow.py ├── FindMedianFromDataStream │ ├── FindMedianFromDataStream.java │ └── FindMedianFromDataStream.py ├── FindMinimumInRotatedSortedArray │ ├── FindMinimumInRotatedSortedArray.java │ └── FindMinimumInRotatedSortedArray.py ├── FindMissingObservations │ ├── FindMissingObservations.java │ └── FindMissingObservations.py ├── FindPeakElement │ ├── FindPeakElement.java │ └── FindPeakElement.py ├── FindRightInterval │ ├── FindRightInterval.java │ └── FindRightInterval.py ├── FindServersThatHandledMostNumberOfRequests │ ├── FindServersThatHandledMostNumberOfRequests.java │ └── FindServersThatHandledMostNumberOfRequests.py ├── FindTheClosestPalindrome │ ├── FindTheClosestPalindrome.java │ └── FindTheClosestPalindrome.py ├── FindTheDuplicateNumber │ ├── FindTheDuplicateNumber.java │ └── FindTheDuplicateNumber.py ├── FindTheWinnerOfTheCircularGame │ ├── FindTheWinnerOfTheCircularGame.java │ └── FindTheWinnerOfTheCircularGame.py ├── FirstMissingPositive │ ├── FirstMissingPositive.java │ └── FirstMissingPositive.py ├── FlattenBinaryTreeToLinkedList │ ├── FlattenBinaryTreeToLinkedList.java │ └── FlattenBinaryTreeToLinkedList.py ├── FlipStringToMonotoneIncreasing │ ├── FlipStringToMonotoneIncreasing.java │ └── FlipStringToMonotoneIncreasing.py ├── GenerateParentheses │ ├── GenerateParentheses.java │ └── GenerateParentheses.py ├── GreatestCommonDivisorOfStrings │ ├── GreatestCommonDivisorOfStrings.java │ └── GreatestCommonDivisorOfStrings.py ├── HappyNumber │ ├── HappyNumber.java │ └── HappyNumber.py ├── HeightChecker │ ├── HeightChecker.java │ └── HeightChecker.py ├── HouseRobber │ ├── HouseRobber.java │ └── HouseRobber.py ├── HouseRobberII │ ├── HouseRobberII.java │ └── HouseRobberII.py ├── ImageSmoother │ ├── ImageSmoother.java │ └── ImageSmoother.py ├── ImplementMagicDictionary │ ├── ImplementMagicDictionary.java │ └── ImplementMagicDictionary.py ├── ImplementQueueUsingStacks │ ├── ImplementQueueUsingStacks.java │ └── ImplementQueueUsingStacks.py ├── ImplementRand10UsingRand7 │ ├── ImplementRand10UsingRand7.java │ └── ImplementRand10UsingRand7.py ├── ImplementStackUsingQueues │ ├── ImplementStackUsingQueues.java │ └── ImplementStackUsingQueues.py ├── ImplementTriePrefixTree │ ├── ImplementTriePrefixTree.java │ └── ImplementTriePrefixTree.py ├── InsertDeleteGetrandomO1 │ ├── InsertDeleteGetrandomO1.java │ └── InsertDeleteGetrandomO1.py ├── IntersectionOfTwoLinkedLists │ ├── IntersectionOfTwoLinkedLists.java │ └── IntersectionOfTwoLinkedLists.py ├── InvertBinaryTree │ ├── InvertBinaryTree.java │ └── InvertBinaryTree.py ├── IslandPerimeter │ ├── IslandPerimeter.java │ └── IslandPerimeter.py ├── JEj789 │ ├── JEj789.java │ └── JEj789.py ├── JumpGame │ ├── JumpGame.java │ └── JumpGame.py ├── KThSmallestInLexicographicalOrder │ ├── KThSmallestInLexicographicalOrder.java │ └── KThSmallestInLexicographicalOrder.py ├── KthLargestElementInAnArray │ ├── KthLargestElementInAnArray.java │ └── KthLargestElementInAnArray.py ├── KthSmallestElementInABst │ ├── KthSmallestElementInABst.java │ └── KthSmallestElementInABst.py ├── LargestPalindromeProduct │ ├── LargestPalindromeProduct.java │ └── LargestPalindromeProduct.py ├── LargestPlusSign │ ├── LargestPlusSign.java │ └── LargestPlusSign.py ├── LargestTriangleArea │ ├── LargestTriangleArea.java │ └── LargestTriangleArea.py ├── LengthOfLongestFibonacciSubsequence │ ├── LengthOfLongestFibonacciSubsequence.java │ └── LengthOfLongestFibonacciSubsequence.py ├── LexicographicalNumbers │ ├── LexicographicalNumbers.java │ └── LexicographicalNumbers.py ├── LianBiaoZhongDaoShuDiKgeJieDianLcof │ ├── LianBiaoZhongDaoShuDiKgeJieDianLcof.java │ └── LianBiaoZhongDaoShuDiKgeJieDianLcof.py ├── LianXuZiShuZuDeZuiDaHeLcof │ ├── LianXuZiShuZuDeZuiDaHeLcof.java │ └── LianXuZiShuZuDeZuiDaHeLcof.py ├── LinkedListCycle │ ├── LinkedListCycle.java │ └── LinkedListCycle.py ├── LinkedListCycleII │ ├── LinkedListCycleII.java │ └── LinkedListCycleII.py ├── LongestAbsoluteFilePath │ ├── LongestAbsoluteFilePath.java │ └── LongestAbsoluteFilePath.py ├── LongestCommonSubsequence │ ├── LongestCommonSubsequence.java │ └── LongestCommonSubsequence.py ├── LongestConsecutiveSequence │ ├── LongestConsecutiveSequence.java │ └── LongestConsecutiveSequence.py ├── LongestIncreasingPathInAMatrix │ ├── LongestIncreasingPathInAMatrix.java │ └── LongestIncreasingPathInAMatrix.py ├── LongestIncreasingSubsequence │ ├── LongestIncreasingSubsequence.java │ └── LongestIncreasingSubsequence.py ├── LongestNiceSubstring │ ├── LongestNiceSubstring.java │ └── LongestNiceSubstring.py ├── LongestPalindromicSubstring │ ├── LongestPalindromicSubstring.java │ └── LongestPalindromicSubstring.py ├── LongestSubstringWithoutRepeatingCharacters │ ├── LongestSubstringWithoutRepeatingCharacters.java │ └── LongestSubstringWithoutRepeatingCharacters.py ├── LongestUncommonSubsequenceI │ ├── LongestUncommonSubsequenceI.java │ └── LongestUncommonSubsequenceI.py ├── LongestUncommonSubsequenceII │ ├── LongestUncommonSubsequenceII.java │ └── LongestUncommonSubsequenceII.py ├── LongestValidParentheses │ ├── LongestValidParentheses.java │ └── LongestValidParentheses.py ├── LongestWordInDictionary │ ├── LongestWordInDictionary.java │ └── LongestWordInDictionary.py ├── LongestWordInDictionaryThroughDeleting │ ├── LongestWordInDictionaryThroughDeleting.java │ └── LongestWordInDictionaryThroughDeleting.py ├── LowestCommonAncestorOfABinaryTree │ ├── LowestCommonAncestorOfABinaryTree.java │ └── LowestCommonAncestorOfABinaryTree.py ├── LruCache │ ├── LruCache.java │ └── LruCache.py ├── LuckyNumbersInAMatrix │ ├── LuckyNumbersInAMatrix.java │ └── LuckyNumbersInAMatrix.py ├── MajorityElement │ ├── MajorityElement.java │ └── MajorityElement.py ├── MajorityElementII │ ├── MajorityElementII.java │ └── MajorityElementII.py ├── MatchsticksToSquare │ ├── MatchsticksToSquare.java │ └── MatchsticksToSquare.py ├── MaxAreaOfIsland │ ├── MaxAreaOfIsland.java │ └── MaxAreaOfIsland.py ├── MaximalSquare │ ├── MaximalSquare.java │ └── MaximalSquare.py ├── MaximizeTheConfusionOfAnExam │ ├── MaximizeTheConfusionOfAnExam.java │ └── MaximizeTheConfusionOfAnExam.py ├── MaximumDepthOfBinaryTree │ ├── MaximumDepthOfBinaryTree.java │ └── MaximumDepthOfBinaryTree.py ├── MaximumDifferenceBetweenIncreasingElements │ ├── MaximumDifferenceBetweenIncreasingElements.java │ └── MaximumDifferenceBetweenIncreasingElements.py ├── MaximumLengthOfRepeatedSubarray │ ├── MaximumLengthOfRepeatedSubarray.java │ └── MaximumLengthOfRepeatedSubarray.py ├── MaximumNumberOfAchievableTransferRequests │ ├── MaximumNumberOfAchievableTransferRequests.java │ └── MaximumNumberOfAchievableTransferRequests.py ├── MaximumProductSubarray │ ├── MaximumProductSubarray.java │ └── MaximumProductSubarray.py ├── MaximumSubarray │ ├── MaximumSubarray.java │ └── MaximumSubarray.py ├── MaximumWidthOfBinaryTree │ ├── MaximumWidthOfBinaryTree.java │ └── MaximumWidthOfBinaryTree.py ├── MedianOfTwoSortedArrays │ ├── MedianOfTwoSortedArrays.java │ └── MedianOfTwoSortedArrays.py ├── MergeIntervals │ ├── MergeIntervals.java │ └── MergeIntervals.py ├── MergeKSortedLists │ ├── MergeKSortedLists.java │ └── MergeKSortedLists.py ├── MergeSortedArray │ ├── MergeSortedArray.java │ └── MergeSortedArray.py ├── MergeTwoSortedLists │ ├── MergeTwoSortedLists.java │ └── MergeTwoSortedLists.py ├── MinStack │ ├── MinStack.java │ └── MinStack.py ├── MiniParser │ ├── MiniParser.java │ └── MiniParser.py ├── MinimumCostForTickets │ ├── MinimumCostForTickets.java │ └── MinimumCostForTickets.py ├── MinimumCostToCutAStick │ ├── MinimumCostToCutAStick.java │ └── MinimumCostToCutAStick.py ├── MinimumCostToMoveChipsToTheSamePosition │ ├── MinimumCostToMoveChipsToTheSamePosition.java │ └── MinimumCostToMoveChipsToTheSamePosition.py ├── MinimumDifferenceBetweenHighestAndLowestOfKScores │ ├── MinimumDifferenceBetweenHighestAndLowestOfKScores.java │ └── MinimumDifferenceBetweenHighestAndLowestOfKScores.py ├── MinimumGeneticMutation │ ├── MinimumGeneticMutation.java │ └── MinimumGeneticMutation.py ├── MinimumHeightTrees │ ├── MinimumHeightTrees.java │ └── MinimumHeightTrees.py ├── MinimumIndexSumOfTwoLists │ ├── MinimumIndexSumOfTwoLists.java │ └── MinimumIndexSumOfTwoLists.py ├── MinimumMovesToEqualArrayElements │ ├── MinimumMovesToEqualArrayElements.java │ └── MinimumMovesToEqualArrayElements.py ├── MinimumMovesToEqualArrayElementsII │ ├── MinimumMovesToEqualArrayElementsII.java │ └── MinimumMovesToEqualArrayElementsII.py ├── MinimumPathSum │ ├── MinimumPathSum.java │ └── MinimumPathSum.py ├── MinimumSizeSubarraySum │ ├── MinimumSizeSubarraySum.java │ └── MinimumSizeSubarraySum.py ├── MinimumWindowSubstring │ ├── MinimumWindowSubstring.java │ └── MinimumWindowSubstring.py ├── MostCommonWord │ ├── MostCommonWord.java │ └── MostCommonWord.py ├── MostFrequentSubtreeSum │ ├── MostFrequentSubtreeSum.java │ └── MostFrequentSubtreeSum.py ├── MoveZeroes │ ├── MoveZeroes.java │ └── MoveZeroes.py ├── MultiplyStrings │ ├── MultiplyStrings.java │ └── MultiplyStrings.py ├── MyCalendarI │ ├── MyCalendarI.java │ └── MyCalendarI.py ├── NAryTreeLevelOrderTraversal │ ├── NAryTreeLevelOrderTraversal.java │ └── NAryTreeLevelOrderTraversal.py ├── NAryTreePostorderTraversal │ ├── NAryTreePostorderTraversal.java │ └── NAryTreePostorderTraversal.py ├── NAryTreePreorderTraversal │ ├── NAryTreePreorderTraversal.java │ └── NAryTreePreorderTraversal.py ├── NRepeatedElementInSize2nArray │ ├── NRepeatedElementInSize2nArray.java │ └── NRepeatedElementInSize2nArray.py ├── NextPermutation │ ├── NextPermutation.java │ └── NextPermutation.py ├── NumberOfIslands │ ├── NumberOfIslands.java │ └── NumberOfIslands.py ├── NumberOfLinesToWriteString │ ├── NumberOfLinesToWriteString.java │ └── NumberOfLinesToWriteString.py ├── NumberOfRecentCalls │ ├── NumberOfRecentCalls.java │ └── NumberOfRecentCalls.py ├── OddEvenLinkedList │ ├── OddEvenLinkedList.java │ └── OddEvenLinkedList.py ├── OneAwayLcci │ ├── OneAwayLcci.java │ └── OneAwayLcci.py ├── OptimalDivision │ ├── OptimalDivision.java │ └── OptimalDivision.py ├── PacificAtlanticWaterFlow │ ├── PacificAtlanticWaterFlow.java │ └── PacificAtlanticWaterFlow.py ├── PalindromeLinkedList │ ├── PalindromeLinkedList.java │ └── PalindromeLinkedList.py ├── PalindromeNumber │ ├── PalindromeNumber.java │ └── PalindromeNumber.py ├── PathSum │ ├── PathSum.java │ └── PathSum.py ├── PathSumII │ ├── PathSumII.java │ └── PathSumII.py ├── PeakIndexInAMountainArray │ ├── PeakIndexInAMountainArray.java │ └── PeakIndexInAMountainArray.py ├── Permutations │ ├── Permutations.java │ └── Permutations.py ├── PermutationsII │ ├── PermutationsII.java │ └── PermutationsII.py ├── PlatesBetweenCandles │ ├── PlatesBetweenCandles.java │ └── PlatesBetweenCandles.py ├── PowxN │ ├── PowxN.java │ └── PowxN.py ├── PrimeArrangements │ ├── PrimeArrangements.java │ └── PrimeArrangements.py ├── ProjectionAreaOf3dShapes │ ├── ProjectionAreaOf3dShapes.java │ └── ProjectionAreaOf3dShapes.py ├── QingWaTiaoTaiJieWenTiLcof │ ├── QingWaTiaoTaiJieWenTiLcof.java │ └── QingWaTiaoTaiJieWenTiLcof.py ├── RandomPickIndex │ ├── RandomPickIndex.java │ └── RandomPickIndex.py ├── RandomPickWithBlacklist │ ├── RandomPickWithBlacklist.java │ └── RandomPickWithBlacklist.py ├── ReachingPoints │ ├── ReachingPoints.java │ └── ReachingPoints.py ├── RemoveColoredPiecesIfBothNeighborsAreTheSameColor │ ├── RemoveColoredPiecesIfBothNeighborsAreTheSameColor.java │ └── RemoveColoredPiecesIfBothNeighborsAreTheSameColor.py ├── RemoveDuplicatesFromSortedArray │ ├── RemoveDuplicatesFromSortedArray.java │ └── RemoveDuplicatesFromSortedArray.py ├── RemoveDuplicatesFromSortedList │ ├── RemoveDuplicatesFromSortedList.java │ └── RemoveDuplicatesFromSortedList.py ├── RemoveDuplicatesFromSortedListII │ ├── RemoveDuplicatesFromSortedListII.java │ └── RemoveDuplicatesFromSortedListII.py ├── RemoveElement │ ├── RemoveElement.java │ └── RemoveElement.py ├── RemoveKDigits │ ├── RemoveKDigits.java │ └── RemoveKDigits.py ├── RemoveNthNodeFromEndOfList │ ├── RemoveNthNodeFromEndOfList.java │ └── RemoveNthNodeFromEndOfList.py ├── RemoveOutermostParentheses │ ├── RemoveOutermostParentheses.java │ └── RemoveOutermostParentheses.py ├── ReorderDataInLogFiles │ ├── ReorderDataInLogFiles.java │ └── ReorderDataInLogFiles.py ├── ReorderList │ ├── ReorderList.java │ └── ReorderList.py ├── RestoreIpAddresses │ ├── RestoreIpAddresses.java │ └── RestoreIpAddresses.py ├── ReverseInteger │ ├── ReverseInteger.java │ └── ReverseInteger.py ├── ReverseLinkedList │ ├── ReverseLinkedList.java │ └── ReverseLinkedList.py ├── ReverseLinkedListII │ ├── ReverseLinkedListII.java │ └── ReverseLinkedListII.py ├── ReverseNodesInKGroup │ ├── ReverseNodesInKGroup.java │ └── ReverseNodesInKGroup.py ├── ReverseOnlyLetters │ ├── ReverseOnlyLetters.java │ └── ReverseOnlyLetters.py ├── ReverseWordsInAString │ ├── ReverseWordsInAString.java │ └── ReverseWordsInAString.py ├── RichestCustomerWealth │ ├── RichestCustomerWealth.java │ └── RichestCustomerWealth.py ├── RotateArray │ ├── RotateArray.java │ └── RotateArray.py ├── RotateImage │ ├── RotateImage.java │ └── RotateImage.py ├── RotateString │ ├── RotateString.java │ └── RotateString.py ├── SearchA2dMatrix │ ├── SearchA2dMatrix.java │ └── SearchA2dMatrix.py ├── SearchA2dMatrixII │ ├── SearchA2dMatrixII.java │ └── SearchA2dMatrixII.py ├── SearchInRotatedSortedArray │ ├── SearchInRotatedSortedArray.java │ └── SearchInRotatedSortedArray.py ├── SearchInRotatedSortedArrayII │ ├── SearchInRotatedSortedArrayII.java │ └── SearchInRotatedSortedArrayII.py ├── SelfDividingNumbers │ ├── SelfDividingNumbers.java │ └── SelfDividingNumbers.py ├── SerializeAndDeserializeBinaryTree │ ├── SerializeAndDeserializeBinaryTree.java │ └── SerializeAndDeserializeBinaryTree.py ├── SerializeAndDeserializeBst │ ├── SerializeAndDeserializeBst.java │ └── SerializeAndDeserializeBst.py ├── ShortestDistanceToACharacter │ ├── ShortestDistanceToACharacter.java │ └── ShortestDistanceToACharacter.py ├── ShuZuZhongDeNiXuDuiLcof │ ├── ShuZuZhongDeNiXuDuiLcof.java │ └── ShuZuZhongDeNiXuDuiLcof.py ├── ShuffleAnArray │ ├── ShuffleAnArray.java │ └── ShuffleAnArray.py ├── SimpleBankSystem │ ├── SimpleBankSystem.java │ └── SimpleBankSystem.py ├── SingleElementInASortedArray │ ├── SingleElementInASortedArray.java │ └── SingleElementInASortedArray.py ├── SingleNumber │ ├── SingleNumber.java │ └── SingleNumber.py ├── SlidingWindowMaximum │ ├── SlidingWindowMaximum.java │ └── SlidingWindowMaximum.py ├── SmallestRangeI │ ├── SmallestRangeI.java │ └── SmallestRangeI.py ├── SmallestRotationWithHighestScore │ ├── SmallestRotationWithHighestScore.java │ └── SmallestRotationWithHighestScore.py ├── SortAnArray │ ├── SortAnArray.java │ └── SortAnArray.py ├── SortArrayByParity │ ├── SortArrayByParity.java │ └── SortArrayByParity.py ├── SortList │ ├── SortList.java │ └── SortList.py ├── SpiralMatrix │ ├── SpiralMatrix.java │ └── SpiralMatrix.py ├── SpiralMatrixII │ ├── SpiralMatrixII.java │ └── SpiralMatrixII.py ├── Sqrtx │ ├── Sqrtx.java │ └── Sqrtx.py ├── StickersToSpellWord │ ├── StickersToSpellWord.java │ └── StickersToSpellWord.py ├── StringToIntegerAtoi │ ├── StringToIntegerAtoi.java │ └── StringToIntegerAtoi.py ├── StrongPasswordChecker │ ├── StrongPasswordChecker.java │ └── StrongPasswordChecker.py ├── SubarrayProductLessThanK │ ├── SubarrayProductLessThanK.java │ └── SubarrayProductLessThanK.py ├── SubarraySumEqualsK │ ├── SubarraySumEqualsK.java │ └── SubarraySumEqualsK.py ├── Subsets │ ├── Subsets.java │ └── Subsets.py ├── SubsetsII │ ├── SubsetsII.java │ └── SubsetsII.py ├── SubstringWithConcatenationOfAllWords │ ├── SubstringWithConcatenationOfAllWords.java │ └── SubstringWithConcatenationOfAllWords.py ├── SubtreeOfAnotherTree │ ├── SubtreeOfAnotherTree.java │ └── SubtreeOfAnotherTree.py ├── SuccessorLcci │ ├── SuccessorLcci.java │ └── SuccessorLcci.py ├── SumOfRootToLeafBinaryNumbers │ ├── SumOfRootToLeafBinaryNumbers.java │ └── SumOfRootToLeafBinaryNumbers.py ├── SumOfSubarrayRanges │ ├── SumOfSubarrayRanges.java │ └── SumOfSubarrayRanges.py ├── SumRootToLeafNumbers │ ├── SumRootToLeafNumbers.java │ └── SumRootToLeafNumbers.py ├── SwapNodesInPairs │ ├── SwapNodesInPairs.java │ └── SwapNodesInPairs.py ├── SymmetricTree │ ├── SymmetricTree.java │ └── SymmetricTree.py ├── TagValidator │ ├── TagValidator.java │ └── TagValidator.py ├── TheNumberOfGoodSubsets │ └── TheNumberOfGoodSubsets.py ├── TheTimeWhenTheNetworkBecomesIdle │ ├── TheTimeWhenTheNetworkBecomesIdle.java │ └── TheTimeWhenTheNetworkBecomesIdle.py ├── TrappingRainWater │ ├── TrappingRainWater.java │ └── TrappingRainWater.py ├── TwoSum │ ├── TwoSum.java │ └── TwoSum.py ├── TwoSumIvInputIsABst │ ├── TwoSumIvInputIsABst.java │ └── TwoSumIvInputIsABst.py ├── UniqueMorseCodeWords │ ├── UniqueMorseCodeWords.java │ └── UniqueMorseCodeWords.py ├── UniquePaths │ ├── UniquePaths.java │ └── UniquePaths.py ├── UniquePathsII │ ├── UniquePathsII.java │ └── UniquePathsII.py ├── UnivaluedBinaryTree │ ├── UnivaluedBinaryTree.java │ └── UnivaluedBinaryTree.py ├── Utf8Validation │ ├── Utf8Validation.java │ └── Utf8Validation.py ├── ValidBoomerang │ ├── ValidBoomerang.java │ └── ValidBoomerang.py ├── ValidPalindrome │ ├── ValidPalindrome.java │ └── ValidPalindrome.py ├── ValidParentheses │ ├── ValidParentheses.java │ └── ValidParentheses.py ├── ValidateBinarySearchTree │ ├── ValidateBinarySearchTree.java │ └── ValidateBinarySearchTree.py ├── ValidateIpAddress │ ├── ValidateIpAddress.java │ └── ValidateIpAddress.py ├── WhereWillTheBallFall │ ├── WhereWillTheBallFall.java │ └── WhereWillTheBallFall.py ├── WiggleSortII │ ├── WiggleSortII.java │ └── WiggleSortII.py ├── WordBreak │ ├── WordBreak.java │ └── WordBreak.py ├── WordBreakII │ ├── WordBreakII.java │ └── WordBreakII.py ├── WordSearch │ ├── WordSearch.java │ └── WordSearch.py ├── YongLiangGeZhanShiXianDuiLieLcof │ ├── YongLiangGeZhanShiXianDuiLieLcof.java │ └── YongLiangGeZhanShiXianDuiLieLcof.py ├── YuanQuanZhongZuiHouShengXiaDeShuZiLcof │ ├── YuanQuanZhongZuiHouShengXiaDeShuZiLcof.java │ └── YuanQuanZhongZuiHouShengXiaDeShuZiLcof.py ├── ZhiShaoYouKgeZhongFuZiFuDeZuiCO6ww │ ├── ZhiShaoYouKgeZhongFuZiFuDeZuiCO6ww.java │ └── ZhiShaoYouKgeZhongFuZiFuDeZuiCO6ww.py ├── ZigzagConversion │ ├── ZigzagConversion.java │ └── ZigzagConversion.py ├── ZuiXiaoDeKgeShuLcof │ ├── ZuiXiaoDeKgeShuLcof.java │ └── ZuiXiaoDeKgeShuLcof.py └── tmp │ ├── Java │ ├── Java.iml │ └── src │ │ └── com │ │ └── dbc │ │ └── algorithm │ │ ├── Algorithm │ │ ├── Reclass │ │ │ ├── ListNode.java │ │ │ ├── Node.java │ │ │ └── TreeNode.java │ │ ├── Solution101_110 │ │ │ ├── Solution.md │ │ │ ├── Solution101.java │ │ │ ├── Solution102.java │ │ │ ├── Solution103.java │ │ │ ├── Solution104.java │ │ │ ├── Solution105.java │ │ │ ├── Solution106.java │ │ │ ├── Solution107.java │ │ │ ├── Solution108.java │ │ │ ├── Solution109.java │ │ │ └── Solution110.java │ │ ├── Solution111_120 │ │ │ ├── Solution.md │ │ │ ├── Solution111.java │ │ │ ├── Solution112.java │ │ │ ├── Solution113.java │ │ │ ├── Solution114.java │ │ │ ├── Solution115.java │ │ │ ├── Solution116.java │ │ │ ├── Solution117.java │ │ │ ├── Solution118.java │ │ │ ├── Solution119.java │ │ │ └── Solution120.java │ │ ├── Solution11_20 │ │ │ ├── Solution.md │ │ │ ├── Solution11.java │ │ │ ├── Solution12.java │ │ │ ├── Solution13.java │ │ │ ├── Solution14.java │ │ │ ├── Solution15.java │ │ │ ├── Solution16.java │ │ │ ├── Solution17.java │ │ │ ├── Solution18.java │ │ │ ├── Solution19.java │ │ │ └── Solution20.java │ │ ├── Solution121_130 │ │ │ ├── Solution.md │ │ │ ├── Solution121.java │ │ │ ├── Solution122.java │ │ │ ├── Solution123.java │ │ │ ├── Solution124.java │ │ │ ├── Solution125.java │ │ │ ├── Solution126.java │ │ │ ├── Solution127.java │ │ │ ├── Solution128.java │ │ │ ├── Solution129.java │ │ │ └── Solution130.java │ │ ├── Solution131_140 │ │ │ ├── Node.java │ │ │ ├── Solution.md │ │ │ ├── Solution131.java │ │ │ ├── Solution132.java │ │ │ ├── Solution133.java │ │ │ ├── Solution134.java │ │ │ ├── Solution135.java │ │ │ ├── Solution136.java │ │ │ ├── Solution137.java │ │ │ ├── Solution138.java │ │ │ ├── Solution139.java │ │ │ └── Solution140.java │ │ ├── Solution141_150 │ │ │ ├── Solution.md │ │ │ ├── Solution141.java │ │ │ ├── Solution142.java │ │ │ ├── Solution143.java │ │ │ ├── Solution144.java │ │ │ ├── Solution145.java │ │ │ ├── Solution146.java │ │ │ ├── Solution147.java │ │ │ ├── Solution148.java │ │ │ ├── Solution149.java │ │ │ └── Solution150.java │ │ ├── Solution151_160 │ │ │ ├── Solution.md │ │ │ ├── Solution151.java │ │ │ ├── Solution152.java │ │ │ ├── Solution153.java │ │ │ ├── Solution154.java │ │ │ ├── Solution155.java │ │ │ ├── Solution156.java │ │ │ ├── Solution157.java │ │ │ ├── Solution158.java │ │ │ ├── Solution159.java │ │ │ └── Solution160.java │ │ ├── Solution161_170 │ │ │ ├── Solution.md │ │ │ ├── Solution161.java │ │ │ ├── Solution162.java │ │ │ ├── Solution163.java │ │ │ ├── Solution164.java │ │ │ ├── Solution165.java │ │ │ ├── Solution166.java │ │ │ ├── Solution167.java │ │ │ ├── Solution168.java │ │ │ ├── Solution169.java │ │ │ └── Solution170.java │ │ ├── Solution171_180 │ │ │ ├── Solution.md │ │ │ ├── Solution171.java │ │ │ ├── Solution172.java │ │ │ ├── Solution173.java │ │ │ ├── Solution174.java │ │ │ ├── Solution175.java │ │ │ ├── Solution176.java │ │ │ ├── Solution177.java │ │ │ ├── Solution178.java │ │ │ ├── Solution179.java │ │ │ └── Solution180.java │ │ ├── Solution181_190 │ │ │ ├── Solution.md │ │ │ ├── Solution181.java │ │ │ ├── Solution182.java │ │ │ ├── Solution183.java │ │ │ ├── Solution184.java │ │ │ ├── Solution185.java │ │ │ ├── Solution186.java │ │ │ ├── Solution187.java │ │ │ ├── Solution188.java │ │ │ ├── Solution189.java │ │ │ └── Solution190.java │ │ ├── Solution191_200 │ │ │ ├── Solution.md │ │ │ ├── Solution191.java │ │ │ ├── Solution192.java │ │ │ ├── Solution193.java │ │ │ ├── Solution194.java │ │ │ ├── Solution195.java │ │ │ ├── Solution196.java │ │ │ ├── Solution197.java │ │ │ ├── Solution198.java │ │ │ ├── Solution199.java │ │ │ └── Solution200.java │ │ ├── Solution1_10 │ │ │ ├── Solution.md │ │ │ ├── Solution1.java │ │ │ ├── Solution10.java │ │ │ ├── Solution2.java │ │ │ ├── Solution3.java │ │ │ ├── Solution4.java │ │ │ ├── Solution5.java │ │ │ ├── Solution6.java │ │ │ ├── Solution7.java │ │ │ ├── Solution8.java │ │ │ └── Solution9.java │ │ ├── Solution201_210 │ │ │ ├── Solution.md │ │ │ ├── Solution201.java │ │ │ ├── Solution202.java │ │ │ ├── Solution203.java │ │ │ ├── Solution204.java │ │ │ ├── Solution205.java │ │ │ ├── Solution206.java │ │ │ ├── Solution207.java │ │ │ ├── Solution208.java │ │ │ ├── Solution209.java │ │ │ └── Solution210.java │ │ ├── Solution211_220 │ │ │ ├── Solution.md │ │ │ ├── Solution211.java │ │ │ ├── Solution212.java │ │ │ ├── Solution213.java │ │ │ ├── Solution214.java │ │ │ ├── Solution215.java │ │ │ ├── Solution216.java │ │ │ ├── Solution217.java │ │ │ ├── Solution218.java │ │ │ ├── Solution219.java │ │ │ └── Solution220.java │ │ ├── Solution21_30 │ │ │ ├── Solution.md │ │ │ ├── Solution21.java │ │ │ ├── Solution22.java │ │ │ ├── Solution23.java │ │ │ ├── Solution24.java │ │ │ ├── Solution25.java │ │ │ ├── Solution26.java │ │ │ ├── Solution27.java │ │ │ ├── Solution28.java │ │ │ ├── Solution29.java │ │ │ └── Solution30.java │ │ ├── Solution221_230 │ │ │ ├── Solution.md │ │ │ ├── Solution221.java │ │ │ ├── Solution222.java │ │ │ ├── Solution223.java │ │ │ ├── Solution224.java │ │ │ ├── Solution225.java │ │ │ ├── Solution226.java │ │ │ ├── Solution227.java │ │ │ ├── Solution228.java │ │ │ ├── Solution229.java │ │ │ └── Solution230.java │ │ ├── Solution231_240 │ │ │ ├── Solution.md │ │ │ ├── Solution231.java │ │ │ ├── Solution232.java │ │ │ ├── Solution233.java │ │ │ ├── Solution234.java │ │ │ ├── Solution235.java │ │ │ ├── Solution236.java │ │ │ ├── Solution237.java │ │ │ ├── Solution238.java │ │ │ ├── Solution239.java │ │ │ └── Solution240.java │ │ ├── Solution241_250 │ │ │ ├── Solution.md │ │ │ ├── Solution250.java │ │ │ ├── Solution251.java │ │ │ ├── Solution252.java │ │ │ ├── Solution253.java │ │ │ ├── Solution254.java │ │ │ ├── Solution255.java │ │ │ └── Solution256.java │ │ ├── Solution31_40 │ │ │ ├── Solution.md │ │ │ ├── Solution31.java │ │ │ ├── Solution32.java │ │ │ ├── Solution33.java │ │ │ ├── Solution34.java │ │ │ ├── Solution35.java │ │ │ ├── Solution36.java │ │ │ ├── Solution37.java │ │ │ ├── Solution38.java │ │ │ ├── Solution39.java │ │ │ └── Solution40.java │ │ ├── Solution41_50 │ │ │ ├── Solution.md │ │ │ ├── Solution41.java │ │ │ ├── Solution42.java │ │ │ ├── Solution43.java │ │ │ ├── Solution44.java │ │ │ ├── Solution45.java │ │ │ ├── Solution46.java │ │ │ ├── Solution47.java │ │ │ ├── Solution48.java │ │ │ ├── Solution49.java │ │ │ └── Solution50.java │ │ ├── Solution51_60 │ │ │ ├── Solution.md │ │ │ ├── Solution51.java │ │ │ ├── Solution52.java │ │ │ ├── Solution53.java │ │ │ ├── Solution54.java │ │ │ ├── Solution55.java │ │ │ ├── Solution56.java │ │ │ ├── Solution57.java │ │ │ ├── Solution58.java │ │ │ ├── Solution59.java │ │ │ └── Solution60.java │ │ ├── Solution61_70 │ │ │ ├── Solution.md │ │ │ ├── Solution61.java │ │ │ ├── Solution62.java │ │ │ ├── Solution63.java │ │ │ ├── Solution64.java │ │ │ ├── Solution65.java │ │ │ ├── Solution66.java │ │ │ ├── Solution67.java │ │ │ ├── Solution68.java │ │ │ ├── Solution69.java │ │ │ └── Solution70.java │ │ ├── Solution71_80 │ │ │ ├── Solution71.java │ │ │ ├── Solution72.java │ │ │ ├── Solution73.java │ │ │ ├── Solution74.java │ │ │ ├── Solution75.java │ │ │ ├── Solution76.java │ │ │ ├── Solution77.java │ │ │ ├── Solution78.java │ │ │ ├── Solution79.java │ │ │ ├── Solution80.java │ │ │ └── Solution80.md │ │ ├── Solution81_90 │ │ │ ├── Solution.md │ │ │ ├── Solution81.java │ │ │ ├── Solution82.java │ │ │ ├── Solution83.java │ │ │ ├── Solution84.java │ │ │ ├── Solution85.java │ │ │ ├── Solution86.java │ │ │ ├── Solution87.java │ │ │ ├── Solution88.java │ │ │ ├── Solution89.java │ │ │ └── Solution90.java │ │ └── Solution91_100 │ │ │ ├── Solution.md │ │ │ ├── Solution100.java │ │ │ ├── Solution91.java │ │ │ ├── Solution92.java │ │ │ ├── Solution93.java │ │ │ ├── Solution94.java │ │ │ ├── Solution95.java │ │ │ ├── Solution96.java │ │ │ ├── Solution97.java │ │ │ ├── Solution98.java │ │ │ └── Solution99.java │ │ ├── Array │ │ ├── AddToArrayFormOfInteger.java │ │ ├── BinaryPrefixDivisibleBy5.java │ │ ├── CanPlaceFlowers.java │ │ ├── CarFleet.java │ │ ├── ContiguousArray.java │ │ ├── ContinuousSubarraySum.java │ │ ├── DegreeOfAnArray.java │ │ ├── DesignParkingSystem.java │ │ ├── FairCandySwap.java │ │ ├── FindAllAnagramsInAString.java │ │ ├── FindAllDuplicatesInAnArray.java │ │ ├── FindAllNumbersDisappearedInAnArray.java │ │ ├── FindFirstAndLastPositionOfElementInSortedArray.java │ │ ├── FindPivotIndex.java │ │ ├── FirstMissingPositive.java │ │ ├── FlippingAnImage.java │ │ ├── GetEqualSubstringsWithinBudget.java │ │ ├── LongestContinuousIncreasingSubsequence.java │ │ ├── LongestSubstringWithoutRepeatingCharacters.java │ │ ├── MajorityElement.java │ │ ├── MaxConsecutiveOnes.java │ │ ├── MaxConsecutiveOnesIII.java │ │ ├── MaximumAverageSubarrayI.java │ │ ├── MaximumNumberOfBallsInABox.java │ │ ├── MaximumPointsYouCanObtainFromCards.java │ │ ├── MaximumProductSubarray.java │ │ ├── MedianOfTwoSortedArrays.java │ │ ├── MergeSortedArray.java │ │ ├── NonDecreasingArray.java │ │ ├── NumberOfEquivalentDominoPairs.java │ │ ├── PascalsTriangle.java │ │ ├── PascalsTriangleII.java │ │ ├── PermutationInString.java │ │ ├── RabbitsInForest.java │ │ ├── ReshapeTheMatrix.java │ │ ├── RestoreTheArrayFromAdjacentPairs.java │ │ ├── SearchA2dMatrixII.java │ │ ├── SetMatrixZeroes.java │ │ ├── SpiralMatrix.java │ │ ├── SpiralMatrixII.java │ │ ├── SubarraySumEqualsK.java │ │ ├── SubarraysWithKDifferentIntegers.java │ │ ├── ToeplitzMatrix.java │ │ ├── TransposeMatrix.java │ │ └── TwoSum.java │ │ ├── BitOperation │ │ ├── CountingBits.java │ │ ├── DecodeXoredArray.java │ │ ├── NumberOf1Bits.java │ │ ├── NumberOfValidWordsForEachPuzzle.java │ │ └── ReverseBits.java │ │ ├── DynamicProgramming │ │ ├── BestTimeToBuyAndSellStock.java │ │ ├── BestTimeToBuyAndSellStockII.java │ │ ├── BestTimeToBuyAndSellStockIII.java │ │ ├── BestTimeToBuyAndSellStockIV.java │ │ ├── BestTimeToBuyAndSellStockWithCoolDown.java │ │ ├── BestTimeToBuyAndSellStockWithTransactionFee.java │ │ ├── ClimbingStairs.java │ │ ├── CreateMaximumNumber.java │ │ ├── DistinctSubsequences.java │ │ ├── LongestIncreasingSubsequence.java │ │ ├── LongestTurbulentSubarray.java │ │ ├── MaximumSubarray.java │ │ ├── MinCostClimbingStairs.java │ │ ├── NumberOfLongestIncreasingSubsequence.java │ │ ├── PalindromePartitioningII.java │ │ ├── RangeSumQuery2dImmutable.java │ │ ├── RangeSumQueryImmutable.java │ │ ├── RussianDollEnvelopes.java │ │ └── VolumeOfHistogramLcci.java │ │ ├── Heap │ │ └── KthLargestElementInAStream.java │ │ ├── LinkedList │ │ ├── AddTwoNumbers.java │ │ ├── CopyListWithRandomPointer.java │ │ ├── DesignHashMap.java │ │ ├── DesignHashset.java │ │ ├── IntersectionOfTwoLinkedLists.java │ │ ├── MergeTwoSortedLists.java │ │ ├── RemoveDuplicatesFromSortedList.java │ │ ├── RemoveDuplicatesFromSortedListII.java │ │ ├── ReverseLinkedList.java │ │ ├── ReverseLinkedListII.java │ │ ├── RotateList.java │ │ └── SwappingNodesInALinkedList.java │ │ ├── Main.java │ │ ├── Math │ │ ├── BulbSwitcher.java │ │ ├── BulbSwitcherII.java │ │ ├── CheckIfItIsAStraightLine.java │ │ ├── IntegerBreak.java │ │ ├── MaximumProductOfThreeNumbers.java │ │ ├── NthDigit.java │ │ ├── NumberOfDigitOne.java │ │ ├── PalindromeNumber.java │ │ ├── PowxN.java │ │ ├── ReverseInteger.java │ │ ├── UglyNumber.java │ │ └── UglyNumberII.java │ │ ├── Pointer │ │ ├── ContainerWithMostWater.java │ │ ├── GrumpyBookstoreOwner.java │ │ ├── LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit.java │ │ ├── LongestRepeatingCharacterReplacement.java │ │ ├── LongestSubstringWithAtLeastKRepeatingCharacters.java │ │ ├── MinimumNumberOfKConsecutiveBitFlips.java │ │ ├── MinimumWindowSubstring.java │ │ ├── RemoveDuplicatesFromSortedArray.java │ │ ├── RemoveDuplicatesFromSortedArrayII.java │ │ ├── Sum3.java │ │ └── Sum4.java │ │ ├── Queue │ │ ├── FindMedianFromDataStream.java │ │ ├── SlidingWindowMaximum.java │ │ └── SlidingWindowMedian.java │ │ ├── ReferOffer │ │ ├── BaShuZiFanYiChengZiFuChuanLcof.java │ │ ├── BaShuZuPaiChengZuiXiaoDeShuLcof.java │ │ ├── BaZiFuChuanZhuanHuanChengZhengShuLcof.java │ │ ├── BiaoShiShuZhiDeZiFuChuanLcof.java │ │ ├── BuKePaiZhongDeShunZiLcof.java │ │ ├── BuYongJiaJianChengChuZuoJiaFaLcof.java │ │ ├── ChouShuLcof.java │ │ ├── CongShangDaoXiaDaYinErChaShuIIILcof.java │ │ ├── CongShangDaoXiaDaYinErChaShuIILcof.java │ │ ├── CongShangDaoXiaDaYinErChaShuLcof.java │ │ ├── CongWeiDaoTouDaYinLianBiaoLcof.java │ │ ├── DaYinCong1DaoZuiDaDeNweiShuLcof.java │ │ ├── DiYiGeZhiChuXianYiCiDeZiFuLcof.java │ │ ├── DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.java │ │ ├── DuiChengDeErChaShuLcof.java │ │ ├── DuiLieDeZuiDaZhiLcof.java │ │ ├── ErChaShuDeJingXiangLcof.java │ │ ├── ErChaShuDeShenDuLcof.java │ │ ├── ErChaShuDeZuiJinGongGongZuXianLcof.java │ │ ├── ErChaSouSuoShuDeDiKDaJieDianLcof.java │ │ ├── ErChaSouSuoShuDeHouXuBianLiXuLieLcof.java │ │ ├── ErChaSouSuoShuDeZuiJinGongGongZuXianLcof.java │ │ ├── ErJinZhiZhong1DeGeShuLcof.java │ │ ├── ErWeiShuZuZhongDeChaZhaoLcof.java │ │ ├── FanZhuanDanCiShunXuLcof.java │ │ ├── FanZhuanLianBiaoLcof.java │ │ ├── FeiBoNaQiShuLieLcof.java │ │ ├── FuZaLianBiaoDeFuZhiLcof.java │ │ ├── GouJianChengJiShuZuLcof.java │ │ ├── GuPiaoDeZuiDaLiRunLcof.java │ │ ├── HeBingLiangGePaiXuDeLianBiaoLcof.java │ │ ├── HeWeiSdeLianXuZhengShuXuLieLcof.java │ │ ├── HeWeiSdeLiangGeShuZiLcof.java │ │ ├── JiQiRenDeYunDongFanWeiLcof.java │ │ ├── JianShengZiIILcof.java │ │ ├── JianShengZiLcof.java │ │ ├── JuZhenZhongDeLuJingLcof.java │ │ ├── LiWuDeZuiDaJieZhiLcof.java │ │ ├── LianBiaoZhongDaoShuDiKgeJieDianLcof.java │ │ ├── LianXuZiShuZuDeZuiDaHeLcof.java │ │ ├── LiangGeLianBiaoDeDiYiGeGongGongJieDianLcof.java │ │ ├── N1ZhengShuZhong1ChuXianDeCiShuLcof.java │ │ ├── NgeTouZiDeDianShuLcof.java │ │ ├── PingHengErChaShuLcof.java │ │ ├── QingWaTiaoTaiJieWenTiLcof.java │ │ ├── Qiu12nLcof.java │ │ ├── QueShiDeShuZiLcof.java │ │ ├── ShanChuLianBiaoDeJieDianLcof.java │ │ ├── ShuDeZiJieGouLcof.java │ │ ├── ShuJuLiuZhongDeZhongWeiShuLcof.java │ │ ├── ShuZhiDeZhengShuCiFangLcof.java │ │ ├── ShuZiXuLieZhongMouYiWeiDeShuZiLcof.java │ │ ├── ShuZuZhongChuXianCiShuChaoGuoYiBanDeShuZiLcof.java │ │ ├── ShuZuZhongDeNiXuDuiLcof.java │ │ ├── ShuZuZhongShuZiChuXianDeCiShuIILcof.java │ │ ├── ShuZuZhongShuZiChuXianDeCiShuLcof.java │ │ ├── ShuZuZhongZhongFuDeShuZiLcof.java │ │ ├── ShunShiZhenDaYinHJuZhenLcof.java │ │ ├── TiHuanKongGeLcof.java │ │ ├── XuanZhuanShuZuDeZuiXiaoShuZiLcof.java │ │ ├── YongLiangGeZhanShiXianDuiLieLcof.java │ │ ├── YuanQuanZhongZuiHouShengXiaDeShuZiLcof.java │ │ ├── ZaiPaiXuShuZuZhongChaZhaoShuZiLcof.java │ │ ├── ZhanDeYaRuDanChuXuLieLcof.java │ │ ├── ZhengZeBiaoDaShiPiPeiLcof.java │ │ ├── ZhongJianErChaShuLcof.java │ │ ├── ZiFuChuanDePaiLieLcof.java │ │ ├── ZuiChangBuHanZhongFuZiFuDeZiZiFuChuanLcof.java │ │ ├── ZuiXiaoDeKgeShuLcof.java │ │ └── ZuoXuanZhuanZiFuChuanLcof.java │ │ ├── Route │ │ ├── PathWithMinimumEffort.java │ │ └── SwimInRisingWater.java │ │ ├── Search │ │ ├── FindMinimumInRotatedSortedArray.java │ │ ├── FindMinimumInRotatedSortedArrayII.java │ │ ├── PalindromePartitioning.java │ │ ├── SearchA2dMatrix.java │ │ ├── SearchInRotatedSortedArrayII.java │ │ ├── SubsetsII.java │ │ └── WordSearch.java │ │ ├── Sort │ │ ├── ArrayPartitionI.java │ │ └── KthLargestElementInAnArray.java │ │ ├── Stack │ │ ├── BasicCalculator.java │ │ ├── BasicCalculatorII.java │ │ ├── ClumsyFactorial.java │ │ ├── EvaluateReversePolishNotation.java │ │ ├── FlattenNestedListIterator.java │ │ ├── NextGreaterElementII.java │ │ ├── Pattern132.java │ │ ├── RemoveAllAdjacentDuplicatesInString.java │ │ └── ValidateStackSequences.java │ │ ├── String │ │ ├── IntegerToRoman.java │ │ ├── LargestNumber.java │ │ ├── LongestCommonPrefix.java │ │ ├── LongestCommonSubsequence.java │ │ ├── LongestPalindromicSubstring.java │ │ ├── RegularExpressionMatching.java │ │ ├── ReverseWordsInAString.java │ │ ├── RomanToInteger.java │ │ ├── StringToIntegerAtoi.java │ │ └── ZigzagConversion.java │ │ ├── Tree │ │ ├── BalancedBinaryTree.java │ │ ├── BinarySearchTreeIterator.java │ │ ├── BinaryTreeLevelOrderTraversal.java │ │ ├── ConstructBinaryTreeFromPreorderAndInorderTraversal.java │ │ ├── FindDuplicateSubtrees.java │ │ ├── InvertBinaryTree.java │ │ ├── LowestCommonAncestorOfABinarySearchTree.java │ │ ├── LowestCommonAncestorOfABinaryTree.java │ │ ├── MaximumDepthOfBinaryTree.java │ │ ├── SearchInABinarySearchTree.java │ │ └── SymmetricTree.java │ │ └── UnionFindSets │ │ ├── AccountsMerge.java │ │ ├── BricksFallingWhenHit.java │ │ ├── CouplesHoldingHands.java │ │ ├── FindCriticalAndPseudoCriticalEdgesInMinimumSpanningTree.java │ │ ├── MinCostToConnectAllPoints.java │ │ ├── MostStonesRemovedWithSameRowOrColumn.java │ │ ├── NumberOfOperationsToMakeNetworkConnected.java │ │ ├── NumberOfProvinces.java │ │ ├── PathWithMinimumEffort.java │ │ ├── RedundantConnection.java │ │ ├── RedundantConnectionII.java │ │ ├── RegionsCutBySlashes.java │ │ ├── RemoveMaxNumberOfEdgesToKeepGraphFullyTraversable.java │ │ ├── SimilarStringGroups.java │ │ └── SwimInRisingWater.java │ ├── Python │ ├── __init__.py │ ├── array │ │ ├── __init__.py │ │ ├── add_to_array_form_of_integer.py │ │ ├── binary_prefix_divisible_by_5.py │ │ ├── can_place_flowers.py │ │ ├── car_fleet.py │ │ ├── contiguous_array.py │ │ ├── continuous_subarray_sum.py │ │ ├── degree_of_an_array.py │ │ ├── design_parking_system.py │ │ ├── fair_candy_swap.py │ │ ├── find_all_anagrams_in_a_string.py │ │ ├── find_all_duplicates_in_an_array.py │ │ ├── find_all_numbers_disappeared_in_an_array.py │ │ ├── find_first_and_last_position_of_element_in_sorted_array.py │ │ ├── find_pivot_index.py │ │ ├── first_missing_positive.py │ │ ├── flipping_an_image.py │ │ ├── get_equal_substrings_within_budget.py │ │ ├── longest_continuous_increasing_subsequence.py │ │ ├── longest_substring_without_repeating_characters.py │ │ ├── majority_element.py │ │ ├── max_consecutive_ones.py │ │ ├── max_consecutive_ones_iii.py │ │ ├── maximum_average_subarray_i.py │ │ ├── maximum_number_of_balls_in_a_box.py │ │ ├── maximum_points_you_can_obtain_from_cards.py │ │ ├── maximum_product_subarray.py │ │ ├── median_of_two_sorted_arrays.py │ │ ├── merge_sorted_array.py │ │ ├── non_decreasing_array.py │ │ ├── number_of_equivalent_domino_pairs.py │ │ ├── pascals_triangle.py │ │ ├── pascals_triangle_ii.py │ │ ├── permutation_in_string.py │ │ ├── rabbits_in_forest.py │ │ ├── reshape_the_matrix.py │ │ ├── restore_the_array_from_adjacent_pairs.py │ │ ├── search_a_2d_matrix_ii.py │ │ ├── set_matrix_zeroes.py │ │ ├── spiral_matrix.py │ │ ├── spiral_matrix_ii.py │ │ ├── subarray_sum_equals_k.py │ │ ├── subarrays_with_k_different_integers.py │ │ ├── toeplitz_matrix.py │ │ ├── transpose_matrix.py │ │ └── two_sum.py │ ├── bit-operation │ │ ├── __init__.py │ │ ├── counting_bits.py │ │ ├── decode_xored_array.py │ │ ├── number_of_1_bits.py │ │ ├── number_of_valid_words_for_each_puzzle.py │ │ └── reverse_bits.py │ ├── dynamic-programming │ │ ├── __init__.py │ │ ├── best_time_to_buy_and_sell_stock.py │ │ ├── best_time_to_buy_and_sell_stock_ii.py │ │ ├── best_time_to_buy_and_sell_stock_iii.py │ │ ├── best_time_to_buy_and_sell_stock_iv.py │ │ ├── best_time_to_buy_and_sell_stock_with_cooldown.py │ │ ├── best_time_to_buy_and_sell_stock_with_transaction_fee.py │ │ ├── climbing_stairs.py │ │ ├── create_maximum_number.py │ │ ├── distinct_subsequences.py │ │ ├── longest_increasing_subsequence.py │ │ ├── longest_turbulent_subarray.py │ │ ├── maximum_subarray.py │ │ ├── min_cost_climbing_stairs.py │ │ ├── number_of_longest_increasing_subsequence.py │ │ ├── palindrome_partitioning_ii.py │ │ ├── range_sum_query_2d_immutable.py │ │ ├── range_sum_query_immutable.py │ │ ├── russian_doll_envelopes.py │ │ └── volume_of_histogram_lcci.py │ ├── heap │ │ ├── __init__.py │ │ └── kth_largest_element_in_a_stream.py │ ├── linked-list │ │ ├── __init__.py │ │ ├── add_two_numbers.py │ │ ├── copy_list_with_random_pointer.py │ │ ├── design_hashmap.py │ │ ├── design_hashset.py │ │ ├── intersection_of_two_linked_lists.py │ │ ├── merge_two_sorted_lists.py │ │ ├── remove_duplicates_from_sorted_list.py │ │ ├── remove_duplicates_from_sorted_list_ii.py │ │ ├── reverse_linked_list.py │ │ ├── reverse_linked_list_ii.py │ │ ├── rotate_list.py │ │ └── swapping_nodes_in_a_linked_list.py │ ├── math │ │ ├── __init__.py │ │ ├── bulb_switcher.py │ │ ├── bulb_switcher_ii.py │ │ ├── check_if_it_is_a_straight_line.py │ │ ├── integer_break.py │ │ ├── maximum_product_of_three_numbers.py │ │ ├── nth_digit.py │ │ ├── number_of_digit_one.py │ │ ├── palindrome_number.py │ │ ├── powx_n.py │ │ ├── reverse_integer.py │ │ ├── ugly_number.py │ │ └── ugly_number_ii.py │ ├── pointer │ │ ├── 3sum.py │ │ ├── 4sum.py │ │ ├── __init__.py │ │ ├── container_with_most_water.py │ │ ├── grumpy_bookstore_owner.py │ │ ├── longest_continuous_subarray_with_absolute_diff_less_than_or_equal_to_limit.py │ │ ├── longest_repeating_character_replacement.py │ │ ├── longest_substring_with_at_least_k_repeating_characters.py │ │ ├── minimum_number_of_k_consecutive_bit_flips.py │ │ ├── minimum_window_substring.py │ │ ├── remove_duplicates_from_sorted_array.py │ │ └── remove_duplicates_from_sorted_array_ii.py │ ├── queue │ │ ├── __init__.py │ │ ├── find_median_from_data_stream.py │ │ ├── sliding_window_maximum.py │ │ └── sliding_window_median.py │ ├── refer-offer │ │ ├── 1nzheng_shu_zhong_1chu_xian_de_ci_shu_lcof.py │ │ ├── __init__.py │ │ ├── ba_shu_zi_fan_yi_cheng_zi_fu_chuan_lcof.py │ │ ├── ba_shu_zu_pai_cheng_zui_xiao_de_shu_lcof.py │ │ ├── ba_zi_fu_chuan_zhuan_huan_cheng_zheng_shu_lcof.py │ │ ├── biao_shi_shu_zhi_de_zi_fu_chuan_lcof.py │ │ ├── bu_ke_pai_zhong_de_shun_zi_lcof.py │ │ ├── bu_yong_jia_jian_cheng_chu_zuo_jia_fa_lcof.py │ │ ├── chou_shu_lcof.py │ │ ├── cong_shang_dao_xia_da_yin_er_cha_shu_ii_lcof.py │ │ ├── cong_shang_dao_xia_da_yin_er_cha_shu_iii_lcof.py │ │ ├── cong_shang_dao_xia_da_yin_er_cha_shu_lcof.py │ │ ├── cong_wei_dao_tou_da_yin_lian_biao_lcof.py │ │ ├── da_yin_cong_1dao_zui_da_de_nwei_shu_lcof.py │ │ ├── di_yi_ge_zhi_chu_xian_yi_ci_de_zi_fu_lcof.py │ │ ├── diao_zheng_shu_zu_shun_xu_shi_qi_shu_wei_yu_ou_shu_qian_mian_lcof.py │ │ ├── dui_cheng_de_er_cha_shu_lcof.py │ │ ├── dui_lie_de_zui_da_zhi_lcof.py │ │ ├── er_cha_shu_de_jing_xiang_lcof.py │ │ ├── er_cha_shu_de_shen_du_lcof.py │ │ ├── er_cha_shu_de_zui_jin_gong_gong_zu_xian_lcof.py │ │ ├── er_cha_sou_suo_shu_de_di_kda_jie_dian_lcof.py │ │ ├── er_cha_sou_suo_shu_de_hou_xu_bian_li_xu_lie_lcof.py │ │ ├── er_cha_sou_suo_shu_de_zui_jin_gong_gong_zu_xian_lcof.py │ │ ├── er_jin_zhi_zhong_1de_ge_shu_lcof.py │ │ ├── er_wei_shu_zu_zhong_de_cha_zhao_lcof.py │ │ ├── fan_zhuan_dan_ci_shun_xu_lcof.py │ │ ├── fan_zhuan_lian_biao_lcof.py │ │ ├── fei_bo_na_qi_shu_lie_lcof.py │ │ ├── fu_za_lian-_biao_de_fu_zhi_lcof.py │ │ ├── gou_jian_cheng_ji_shu_zu_lcof.py │ │ ├── gu_piao_de_zui_da_li_run_lcof.py │ │ ├── he_bing_liang_ge_pai_xu_de_lian_biao_lcof.py │ │ ├── he_wei_sde_lian_xu_zheng_shu_xu_lie_lcof.py │ │ ├── he_wei_sde_liang_ge_shu_zi_lcof.py │ │ ├── ji_qi_ren_de_yun_dong_fan_wei_lcof.py │ │ ├── jian_sheng_zi_ii_lcof.py │ │ ├── jian_sheng_zi_lcof.py │ │ ├── ju_zhen_zhong_de_lu_jing_lcof.py │ │ ├── li_wu_de_zui_da_jie_zhi_lcof.py │ │ ├── lian_biao_zhong_dao_shu_di_kge_jie_dian_lcof.py │ │ ├── lian_xu_zi_shu_zu_de_zui_da_he_lcof.py │ │ ├── liang_ge_lian_biao_de_di_yi_ge_gong_gong_jie_dian_lcof.py │ │ ├── nge_tou_zi_de_dian_shu_lcof.py │ │ ├── ping_heng_er_cha_shu_lcof.py │ │ ├── qing_wa_tiao_tai_jie_wen_ti_lcof.py │ │ ├── qiu_12n_lcof.py │ │ ├── que_shi_de_shu_zi_lcof.py │ │ ├── shan_chu_lian_biao_de_jie_dian_lcof.py │ │ ├── shu_de_zi_jie_gou_lcof.py │ │ ├── shu_ju_liu_zhong_de_zhong_wei_shu_lcof.py │ │ ├── shu_zhi_de_zheng_shu_ci_fang_lcof.py │ │ ├── shu_zi_xu_lie_zhong_mou_yi_wei_de_shu_zi_lcof.py │ │ ├── shu_zu_zhong_chu_xian_ci_shu_chao_guo_yi_ban_de_shu_zi_lcof.py │ │ ├── shu_zu_zhong_de_ni_xu_dui_lcof.py │ │ ├── shu_zu_zhong_shu_zi_chu_xian_de_ci_shu_ii_lcof.py │ │ ├── shu_zu_zhong_shu_zi_chu_xian_de_ci_shu_lcof.py │ │ ├── shu_zu_zhong_zhong_fu_de_shu_zi_lcof.py │ │ ├── shun_shi_zhen_da_yin_ju_zhen_lcof.py │ │ ├── ti_huan_kong_ge_lcof.py │ │ ├── xuan_zhuan_shu_zu_de_zui_xiao_shu_zi_lcof.py │ │ ├── yong_liang_ge_zhan_shi_xian_dui_lie_lcof.py │ │ ├── yuan_quan_zhong_zui_hou_sheng_xia_de_shu_zi_lcof.py │ │ ├── zai_pai_xu_shu_zu_zhong_cha_zhao_shu_zi_lcof.py │ │ ├── zhan_de_ya_ru_dan_chu_xu_lie_lcof.py │ │ ├── zheng_ze_biao_da_shi_pi_pei_lcof.py │ │ ├── zhong_jian_er_cha_shu_lcof.py │ │ ├── zi_fu_chuan_de_pai_lie_lcof.py │ │ ├── zui_chang_bu_han_zhong_fu_zi_fu_de_zi_zi_fu_chuan_lcof.py │ │ ├── zui_xiao_de_kge_shu_lcof.py │ │ └── zuo_xuan_zhuan_zi_fu_chuan_lcof.py │ ├── route │ │ ├── __init__.py │ │ ├── path_with_minimum_effort.py │ │ └── swim_in_rising_water.py │ ├── search │ │ ├── __init__.py │ │ ├── find_minimum_in_rotated_sorted_array.py │ │ ├── find_minimum_in_rotated_sorted_array_ii.py │ │ ├── palindrome_partitioning.py │ │ ├── search_a_2d_matrix.py │ │ ├── search_in_rotated_sorted_array_ii.py │ │ ├── subsets_ii.py │ │ └── word_search.py │ ├── sort │ │ ├── __init__.py │ │ ├── array_partition_i.py │ │ └── kth_largest_element_in_an_array.py │ ├── stack │ │ ├── 132_pattern.py │ │ ├── __init__.py │ │ ├── basic_calculator.py │ │ ├── basic_calculator_ii.py │ │ ├── clumsy_factorial.py │ │ ├── evaluate_reverse_polish_notation.py │ │ ├── flatten_nested_list_iterator.py │ │ ├── next_greater_element_ii.py │ │ ├── remove_all_adjacent_duplicates_in_string.py │ │ └── validate_stack_sequences.py │ ├── string │ │ ├── __init__.py │ │ ├── integer_to_roman.py │ │ ├── largest_number.py │ │ ├── longest_common_prefix.py │ │ ├── longest_common_subsequence.py │ │ ├── longest_palindromic_substring.py │ │ ├── regular_expression_matching.py │ │ ├── reverse_words_in_a_string.py │ │ ├── roman_to_integer.py │ │ ├── string_to_integer_atoi.py │ │ └── zigzag_conversion.py │ ├── tree │ │ ├── __init__.py │ │ ├── balanced_binary_tree.py │ │ ├── binary_search_tree_iterator.py │ │ ├── binary_tree_level_order_traversal.py │ │ ├── construct_binary_tree_from_preorder_and_inorder_traversal.py │ │ ├── find_duplicate_subtrees.py │ │ ├── invert_binary_tree.py │ │ ├── lowest_common_ancestor_of_a_binary_search_tree.py │ │ ├── lowest_common_ancestor_of_a_binary_tree.py │ │ ├── maximum_depth_of_binary_tree.py │ │ ├── search_in_a_binary_search_tree.py │ │ └── symmetric_tree.py │ └── union-find-sets │ │ ├── __init__.py │ │ ├── accounts_merge.py │ │ ├── bricks_falling_when_hit.py │ │ ├── couples_holding_hands.py │ │ ├── find_critical_and_pseudo_critical_edges_in_minimum_spanning_tree.py │ │ ├── min_cost_to_connect_all_points.py │ │ ├── most_stones_removed_with_same_row_or_column.py │ │ ├── number_of_operations_to_make_network_connected.py │ │ ├── number_of_provinces.py │ │ ├── path_with_minimum_effort.py │ │ ├── redundant_connection.py │ │ ├── redundant_connection_ii.py │ │ ├── regions_cut_by_slashes.py │ │ ├── remove_max_number_of_edges_to_keep_graph_fully_traversable.py │ │ ├── similar_string_groups.py │ │ └── swim_in_rising_water.py │ ├── Subject │ ├── AccountsMerge.png │ ├── AddToArrayFormOfInteger.png │ ├── AddTwoNumbers.png │ ├── ArrayPartitionI.png │ ├── BalancedBinaryTree.png │ ├── BasicCalculator.png │ ├── BasicCalculatorII.png │ ├── BestTimeToBuyAndSellStock.png │ ├── BestTimeToBuyAndSellStockII.png │ ├── BestTimeToBuyAndSellStockIII.png │ ├── BestTimeToBuyAndSellStockIV.png │ ├── BestTimeToBuyAndSellStockWithCoolDown.png │ ├── BestTimeToBuyAndSellStockWithTransactionFee.png │ ├── BinaryPrefixDivisibleBy5.png │ ├── BinarySearchTreeIterator.png │ ├── BinaryTreeLevelOrderTraversal.png │ ├── BricksFallingWhenHit.png │ ├── BulbSwitcher.png │ ├── BulbSwitcherII.png │ ├── CanPlaceFlowers.png │ ├── CarFleet.png │ ├── CheckIfItIsAStraightLine.png │ ├── ChouShuLcof.png │ ├── ClimbingStairs.png │ ├── ClumsyFactorial.png │ ├── ConstructBinaryTreeFromPreorderAndInorderTraversal.png │ ├── ContainerWithMostWater.png │ ├── ContiguousArray.png │ ├── ContinuousSubarraySum.png │ ├── CopyListWithRandomPointer.png │ ├── CountingBits.png │ ├── CouplesHoldingHands.png │ ├── CreateMaximumNumber.png │ ├── DecodeXoredArray.png │ ├── DegreeOfAnArray.png │ ├── DesignHashMap.png │ ├── DesignHashset.png │ ├── DesignParkingSystem.png │ ├── DistinctSubsequences.png │ ├── EvaluateReversePolishNotation.png │ ├── FairCandySwap.png │ ├── FindAllAnagramsInAString.png │ ├── FindAllDuplicatesInAnArray.png │ ├── FindAllNumbersDisappearedInAnArray.png │ ├── FindCriticalAndPseudoCriticalEdgesInMinimumSpanningTree.png │ ├── FindDuplicateSubtrees.png │ ├── FindFirstAndLastPositionOfElementInSortedArray.png │ ├── FindMedianFromDataStream.png │ ├── FindMinimumInRotatedSortedArray.png │ ├── FindMinimumInRotatedSortedArrayII.png │ ├── FindPivotIndex.png │ ├── FirstMissingPositive.png │ ├── FlattenNestedListIterator.png │ ├── FlippingAnImage.png │ ├── GetEqualSubstringsWithinBudget.png │ ├── GrumpyBookstoreOwner.png │ ├── HeBingLiangGePaiXuDeLianBiaoLcof.png │ ├── IntegerBreak.png │ ├── IntegerToRoman.png │ ├── InvertBinaryTree.png │ ├── KthLargestElementInAStream.png │ ├── KthLargestElementInAnArray.png │ ├── LargestNumber.png │ ├── LongestCommonPrefix.png │ ├── LongestCommonSubsequence.png │ ├── LongestContinuousIncreasingSubsequence.png │ ├── LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit.png │ ├── LongestIncreasingSubsequence.png │ ├── LongestPalindromicSubstring.png │ ├── LongestRepeatingCharacterReplacement.png │ ├── LongestSubstringWithAtLeastKRepeatingCharacters.png │ ├── LongestSubstringWithoutRepeatingCharacters.png │ ├── LongestTurbulentSubarray.png │ ├── LowestCommonAncestorOfABinarySearchTree.png │ ├── LowestCommonAncestorOfABinaryTree.png │ ├── MajorityElement.png │ ├── MaxConsecutiveOnes.png │ ├── MaxConsecutiveOnesIII.png │ ├── MaximumAverageSubarrayI.png │ ├── MaximumDepthOfBinaryTree.png │ ├── MaximumNumberOfBallsInABox.png │ ├── MaximumPointsYouCanObtainFromCards.png │ ├── MaximumProductOfThreeNumbers.png │ ├── MaximumProductSubarray.png │ ├── MaximumSubarray.png │ ├── MedianOfTwoSortedArrays.png │ ├── MergeSortedArray.png │ ├── MinCostClimbingStairs.png │ ├── MinCostToConnectAllPoints.png │ ├── MinimumNumberOfKConsecutiveBitFlips.png │ ├── MinimumWindowSubstring.png │ ├── MostStonesRemovedWithSameRowOrColumn.png │ ├── N1ZhengShuZhong1ChuXianDeCiShuLcof.png │ ├── NextGreaterElementII.png │ ├── NonDecreasingArray.png │ ├── NthDigit.png │ ├── NumberOf1Bits.png │ ├── NumberOfEquivalentDominoPairs.png │ ├── NumberOfLongestIncreasingSubsequence.png │ ├── NumberOfOperationsToMakeNetworkConnected.png │ ├── NumberOfProvinces.png │ ├── NumberOfValidWordsForEachPuzzle.png │ ├── PalindromeNumber.png │ ├── PalindromePartitioning.png │ ├── PalindromePartitioningII.png │ ├── PascalsTriangle.png │ ├── PascalsTriangleII.png │ ├── PathWithMinimumEffort.png │ ├── Pattern132.png │ ├── PermutationInString.png │ ├── PowxN.png │ ├── RabbitsInForest.png │ ├── RangeSumQuery2dImmutable.png │ ├── RangeSumQueryImmutable.png │ ├── RedundantConnection.png │ ├── RedundantConnectionII.png │ ├── ReferOffer │ │ ├── BaShuZiFanYiChengZiFuChuanLcof.png │ │ ├── BaShuZuPaiChengZuiXiaoDeShuLcof.png │ │ ├── BaZiFuChuanZhuanHuanChengZhengShuLcof.png │ │ ├── BiaoShiShuZhiDeZiFuChuanLcof.png │ │ ├── BuKePaiZhongDeShunZiLcof.png │ │ ├── BuYongJiaJianChengChuZuoJiaFaLcof.png │ │ ├── CongShangDaoXiaDaYinErChaShuIIILcof.png │ │ ├── CongShangDaoXiaDaYinErChaShuIILcof.png │ │ ├── CongShangDaoXiaDaYinErChaShuLcof.png │ │ ├── CongWeiDaoTouDaYinLianBiaoLcof.png │ │ ├── DaYinCong1DaoZuiDaDeNweiShuLcof.png │ │ ├── DiYiGeZhiChuXianYiCiDeZiFuLcof.png │ │ ├── DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.png │ │ ├── DuiChengDeErChaShuLcof.png │ │ ├── DuiLieDeZuiDaZhiLcof.png │ │ ├── ErChaShuDeJingXiangLcof.png │ │ ├── ErChaShuDeShenDuLcof.png │ │ ├── ErChaShuDeZuiJinGongGongZuXianLcof.png │ │ ├── ErChaSouSuoShuDeDiKDaJieDianLcof.png │ │ ├── ErChaSouSuoShuDeHouXuBianLiXuLieLcof.png │ │ ├── ErChaSouSuoShuDeZuiJinGongGongZuXianLcof.png │ │ ├── ErJinZhiZhong1DeGeShuLcof.png │ │ ├── ErWeiShuZuZhongDeChaZhaoLcof.png │ │ ├── FanZhuanDanCiShunXuLcof.png │ │ ├── FanZhuanLianBiaoLcof.png │ │ ├── FeiBoNaQiShuLieLcof.png │ │ ├── FuZaLianBiaoDeFuZhiLcof.png │ │ ├── GouJianChengJiShuZuLcof.png │ │ ├── GuPiaoDeZuiDaLiRunLcof.png │ │ ├── HeBingLiangGePaiXuDeLianBiaoLcof.png │ │ ├── HeWeiSdeLianXuZhengShuXuLieLcof.png │ │ ├── HeWeiSdeLiangGeShuZiLcof.png │ │ ├── JiQiRenDeYunDongFanWeiLcof.png │ │ ├── JianShengZiIILcof.png │ │ ├── JianShengZiLcof.png │ │ ├── JuZhenZhongDeLuJingLcof.png │ │ ├── LiWuDeZuiDaJieZhiLcof.png │ │ ├── LianBiaoZhongDaoShuDiKgeJieDianLcof.png │ │ ├── LianXuZiShuZuDeZuiDaHeLcof.png │ │ ├── LiangGeLianBiaoDeDiYiGeGongGongJieDianLcof.png │ │ ├── N1ZhengShuZhong1ChuXianDeCiShuLcof.png │ │ ├── NgeTouZiDeDianShuLcof.png │ │ ├── PingHengErChaShuLcof.png │ │ ├── QingWaTiaoTaiJieWenTiLcof.png │ │ ├── Qiu12nLcof.png │ │ ├── QueShiDeShuZiLcof.png │ │ ├── ShanChuLianBiaoDeJieDianLcof.png │ │ ├── ShuDeZiJieGouLcof.png │ │ ├── ShuJuLiuZhongDeZhongWeiShuLcof.png │ │ ├── ShuZhiDeZhengShuCiFangLcof.png │ │ ├── ShuZiXuLieZhongMouYiWeiDeShuZiLcof.png │ │ ├── ShuZuZhongChuXianCiShuChaoGuoYiBanDeShuZiLcof.png │ │ ├── ShuZuZhongDeNiXuDuiLcof.png │ │ ├── ShuZuZhongShuZiChuXianDeCiShuIILcof.png │ │ ├── ShuZuZhongShuZiChuXianDeCiShuLcof.png │ │ ├── ShuZuZhongZhongFuDeShuZiLcof.png │ │ ├── ShunShiZhenDaYinHJuZhenLcof.png │ │ ├── TiHuanKongGeLcof.png │ │ ├── XuanZhuanShuZuDeZuiXiaoShuZiLcof.png │ │ ├── YongLiangGeZhanShiXianDuiLieLcof.png │ │ ├── YuanQuanZhongZuiHouShengXiaDeShuZiLcof.png │ │ ├── ZaiPaiXuShuZuZhongChaZhaoShuZiLcof.png │ │ ├── ZhanDeYaRuDanChuXuLieLcof.png │ │ ├── ZhengZeBiaoDaShiPiPeiLcof.png │ │ ├── ZhongJianErChaShuLcof.png │ │ ├── ZiFuChuanDePaiLieLcof.png │ │ ├── ZuiChangBuHanZhongFuZiFuDeZiZiFuChuanLcof.png │ │ ├── ZuiXiaoDeKgeShuLcof.png │ │ ├── ZuoXuanZhuanZiFuChuanLcof.png │ │ └── nthUglyNumber.png │ ├── RegionsCutBySlashes.png │ ├── RegularExpressionMatching.png │ ├── RemoveAllAdjacentDuplicatesInString.png │ ├── RemoveDuplicatesFromSortedArray.png │ ├── RemoveDuplicatesFromSortedArrayII.png │ ├── RemoveDuplicatesFromSortedList.png │ ├── RemoveDuplicatesFromSortedListII.png │ ├── RemoveMaxNumberOfEdgesToKeepGraphFullyTraversable.png │ ├── ReshapeTheMatrix.png │ ├── RestoreTheArrayFromAdjacentPairs.png │ ├── ReverseBits.png │ ├── ReverseInteger.png │ ├── ReverseLinkedList.png │ ├── ReverseLinkedListII.png │ ├── ReverseWordsInAString.png │ ├── RomanToInteger.png │ ├── RotateList.png │ ├── RussianDollEnvelopes.png │ ├── SearchA2dMatrix.png │ ├── SearchInABinarySearchTree.png │ ├── SearchInRotatedSortedArrayII.png │ ├── SetMatrixZeroes.png │ ├── SimilarStringGroups.png │ ├── SlidingWindowMaximum.png │ ├── SlidingWindowMedian.png │ ├── SpiralMatrix.png │ ├── SpiralMatrixII.png │ ├── StringToIntegerAtoi.png │ ├── SubarraySumEqualsK.png │ ├── SubarraysWithKDifferentIntegers.png │ ├── SubsetsII.png │ ├── Sum3.png │ ├── Sum4.png │ ├── SwappingNodesInALinkedList.png │ ├── SwimInRisingWater.png │ ├── SymmetricTree.png │ ├── ToeplitzMatrix.png │ ├── TransposeMatrix.png │ ├── TwoSum.png │ ├── UglyNumber.png │ ├── ValidateStackSequences.png │ ├── VolumeOfHistogramLcci.png │ ├── WordSearch.png │ ├── ZigzagConversion.png │ └── findNumberIn2DArray.png │ └── __init__.py ├── gunicorn.conf.py ├── requirement.txt ├── run.sh ├── server.py ├── settings.py ├── static ├── editormd │ ├── editormd.css │ ├── editormd.js │ ├── editormd.min.css │ └── lib │ │ ├── codemirror │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── addon │ │ │ ├── comment │ │ │ │ ├── comment.js │ │ │ │ └── continuecomment.js │ │ │ ├── dialog │ │ │ │ ├── dialog.css │ │ │ │ └── dialog.js │ │ │ ├── display │ │ │ │ ├── fullscreen.css │ │ │ │ ├── fullscreen.js │ │ │ │ ├── panel.js │ │ │ │ ├── placeholder.js │ │ │ │ └── rulers.js │ │ │ ├── edit │ │ │ │ ├── closebrackets.js │ │ │ │ ├── closetag.js │ │ │ │ ├── continuelist.js │ │ │ │ ├── matchbrackets.js │ │ │ │ ├── matchtags.js │ │ │ │ └── trailingspace.js │ │ │ ├── fold │ │ │ │ ├── brace-fold.js │ │ │ │ ├── comment-fold.js │ │ │ │ ├── foldcode.js │ │ │ │ ├── foldgutter.css │ │ │ │ ├── foldgutter.js │ │ │ │ ├── indent-fold.js │ │ │ │ ├── markdown-fold.js │ │ │ │ └── xml-fold.js │ │ │ ├── hint │ │ │ │ ├── anyword-hint.js │ │ │ │ ├── css-hint.js │ │ │ │ ├── html-hint.js │ │ │ │ ├── javascript-hint.js │ │ │ │ ├── show-hint.css │ │ │ │ ├── show-hint.js │ │ │ │ ├── sql-hint.js │ │ │ │ └── xml-hint.js │ │ │ ├── lint │ │ │ │ ├── coffeescript-lint.js │ │ │ │ ├── css-lint.js │ │ │ │ ├── javascript-lint.js │ │ │ │ ├── json-lint.js │ │ │ │ ├── lint.css │ │ │ │ ├── lint.js │ │ │ │ └── yaml-lint.js │ │ │ ├── merge │ │ │ │ ├── merge.css │ │ │ │ └── merge.js │ │ │ ├── mode │ │ │ │ ├── loadmode.js │ │ │ │ ├── multiplex.js │ │ │ │ ├── multiplex_test.js │ │ │ │ ├── overlay.js │ │ │ │ └── simple.js │ │ │ ├── runmode │ │ │ │ ├── colorize.js │ │ │ │ ├── runmode-standalone.js │ │ │ │ ├── runmode.js │ │ │ │ └── runmode.node.js │ │ │ ├── scroll │ │ │ │ ├── annotatescrollbar.js │ │ │ │ ├── scrollpastend.js │ │ │ │ ├── simplescrollbars.css │ │ │ │ └── simplescrollbars.js │ │ │ ├── search │ │ │ │ ├── match-highlighter.js │ │ │ │ ├── matchesonscrollbar.css │ │ │ │ ├── matchesonscrollbar.js │ │ │ │ ├── search.js │ │ │ │ └── searchcursor.js │ │ │ ├── selection │ │ │ │ ├── active-line.js │ │ │ │ ├── mark-selection.js │ │ │ │ └── selection-pointer.js │ │ │ ├── tern │ │ │ │ ├── tern.css │ │ │ │ ├── tern.js │ │ │ │ └── worker.js │ │ │ └── wrap │ │ │ │ └── hardwrap.js │ │ ├── addons.min.js │ │ ├── bower.json │ │ ├── codemirror.min.css │ │ ├── codemirror.min.js │ │ ├── lib │ │ │ ├── codemirror.css │ │ │ └── codemirror.js │ │ ├── mode │ │ │ ├── apl │ │ │ │ ├── apl.js │ │ │ │ └── index.html │ │ │ ├── asterisk │ │ │ │ ├── asterisk.js │ │ │ │ └── index.html │ │ │ ├── clike │ │ │ │ ├── clike.js │ │ │ │ ├── index.html │ │ │ │ └── scala.html │ │ │ ├── clojure │ │ │ │ ├── clojure.js │ │ │ │ └── index.html │ │ │ ├── cobol │ │ │ │ ├── cobol.js │ │ │ │ └── index.html │ │ │ ├── coffeescript │ │ │ │ ├── coffeescript.js │ │ │ │ └── index.html │ │ │ ├── commonlisp │ │ │ │ ├── commonlisp.js │ │ │ │ └── index.html │ │ │ ├── css │ │ │ │ ├── css.js │ │ │ │ ├── index.html │ │ │ │ ├── less.html │ │ │ │ ├── less_test.js │ │ │ │ ├── scss.html │ │ │ │ ├── scss_test.js │ │ │ │ └── test.js │ │ │ ├── cypher │ │ │ │ ├── cypher.js │ │ │ │ └── index.html │ │ │ ├── d │ │ │ │ ├── d.js │ │ │ │ └── index.html │ │ │ ├── dart │ │ │ │ ├── dart.js │ │ │ │ └── index.html │ │ │ ├── diff │ │ │ │ ├── diff.js │ │ │ │ └── index.html │ │ │ ├── django │ │ │ │ ├── django.js │ │ │ │ └── index.html │ │ │ ├── dockerfile │ │ │ │ ├── dockerfile.js │ │ │ │ └── index.html │ │ │ ├── dtd │ │ │ │ ├── dtd.js │ │ │ │ └── index.html │ │ │ ├── dylan │ │ │ │ ├── dylan.js │ │ │ │ └── index.html │ │ │ ├── ebnf │ │ │ │ ├── ebnf.js │ │ │ │ └── index.html │ │ │ ├── ecl │ │ │ │ ├── ecl.js │ │ │ │ └── index.html │ │ │ ├── eiffel │ │ │ │ ├── eiffel.js │ │ │ │ └── index.html │ │ │ ├── erlang │ │ │ │ ├── erlang.js │ │ │ │ └── index.html │ │ │ ├── forth │ │ │ │ ├── forth.js │ │ │ │ └── index.html │ │ │ ├── fortran │ │ │ │ ├── fortran.js │ │ │ │ └── index.html │ │ │ ├── gas │ │ │ │ ├── gas.js │ │ │ │ └── index.html │ │ │ ├── gfm │ │ │ │ ├── gfm.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ ├── gherkin │ │ │ │ ├── gherkin.js │ │ │ │ └── index.html │ │ │ ├── go │ │ │ │ ├── go.js │ │ │ │ └── index.html │ │ │ ├── groovy │ │ │ │ ├── groovy.js │ │ │ │ └── index.html │ │ │ ├── haml │ │ │ │ ├── haml.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ ├── haskell │ │ │ │ ├── haskell.js │ │ │ │ └── index.html │ │ │ ├── haxe │ │ │ │ ├── haxe.js │ │ │ │ └── index.html │ │ │ ├── htmlembedded │ │ │ │ ├── htmlembedded.js │ │ │ │ └── index.html │ │ │ ├── htmlmixed │ │ │ │ ├── htmlmixed.js │ │ │ │ └── index.html │ │ │ ├── http │ │ │ │ ├── http.js │ │ │ │ └── index.html │ │ │ ├── idl │ │ │ │ ├── idl.js │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── jade │ │ │ │ ├── index.html │ │ │ │ └── jade.js │ │ │ ├── javascript │ │ │ │ ├── index.html │ │ │ │ ├── javascript.js │ │ │ │ ├── json-ld.html │ │ │ │ ├── test.js │ │ │ │ └── typescript.html │ │ │ ├── jinja2 │ │ │ │ ├── index.html │ │ │ │ └── jinja2.js │ │ │ ├── julia │ │ │ │ ├── index.html │ │ │ │ └── julia.js │ │ │ ├── kotlin │ │ │ │ ├── index.html │ │ │ │ └── kotlin.js │ │ │ ├── livescript │ │ │ │ ├── index.html │ │ │ │ └── livescript.js │ │ │ ├── lua │ │ │ │ ├── index.html │ │ │ │ └── lua.js │ │ │ ├── markdown │ │ │ │ ├── index.html │ │ │ │ ├── markdown.js │ │ │ │ └── test.js │ │ │ ├── meta.js │ │ │ ├── mirc │ │ │ │ ├── index.html │ │ │ │ └── mirc.js │ │ │ ├── mllike │ │ │ │ ├── index.html │ │ │ │ └── mllike.js │ │ │ ├── modelica │ │ │ │ ├── index.html │ │ │ │ └── modelica.js │ │ │ ├── nginx │ │ │ │ ├── index.html │ │ │ │ └── nginx.js │ │ │ ├── ntriples │ │ │ │ ├── index.html │ │ │ │ └── ntriples.js │ │ │ ├── octave │ │ │ │ ├── index.html │ │ │ │ └── octave.js │ │ │ ├── pascal │ │ │ │ ├── index.html │ │ │ │ └── pascal.js │ │ │ ├── pegjs │ │ │ │ ├── index.html │ │ │ │ └── pegjs.js │ │ │ ├── perl │ │ │ │ ├── index.html │ │ │ │ └── perl.js │ │ │ ├── php │ │ │ │ ├── index.html │ │ │ │ ├── php.js │ │ │ │ └── test.js │ │ │ ├── pig │ │ │ │ ├── index.html │ │ │ │ └── pig.js │ │ │ ├── properties │ │ │ │ ├── index.html │ │ │ │ └── properties.js │ │ │ ├── puppet │ │ │ │ ├── index.html │ │ │ │ └── puppet.js │ │ │ ├── python │ │ │ │ ├── index.html │ │ │ │ └── python.js │ │ │ ├── q │ │ │ │ ├── index.html │ │ │ │ └── q.js │ │ │ ├── r │ │ │ │ ├── index.html │ │ │ │ └── r.js │ │ │ ├── rpm │ │ │ │ ├── changes │ │ │ │ │ └── index.html │ │ │ │ ├── index.html │ │ │ │ └── rpm.js │ │ │ ├── rst │ │ │ │ ├── index.html │ │ │ │ └── rst.js │ │ │ ├── ruby │ │ │ │ ├── index.html │ │ │ │ ├── ruby.js │ │ │ │ └── test.js │ │ │ ├── rust │ │ │ │ ├── index.html │ │ │ │ └── rust.js │ │ │ ├── sass │ │ │ │ ├── index.html │ │ │ │ └── sass.js │ │ │ ├── scheme │ │ │ │ ├── index.html │ │ │ │ └── scheme.js │ │ │ ├── shell │ │ │ │ ├── index.html │ │ │ │ ├── shell.js │ │ │ │ └── test.js │ │ │ ├── sieve │ │ │ │ ├── index.html │ │ │ │ └── sieve.js │ │ │ ├── slim │ │ │ │ ├── index.html │ │ │ │ ├── slim.js │ │ │ │ └── test.js │ │ │ ├── smalltalk │ │ │ │ ├── index.html │ │ │ │ └── smalltalk.js │ │ │ ├── smarty │ │ │ │ ├── index.html │ │ │ │ └── smarty.js │ │ │ ├── smartymixed │ │ │ │ ├── index.html │ │ │ │ └── smartymixed.js │ │ │ ├── solr │ │ │ │ ├── index.html │ │ │ │ └── solr.js │ │ │ ├── soy │ │ │ │ ├── index.html │ │ │ │ └── soy.js │ │ │ ├── sparql │ │ │ │ ├── index.html │ │ │ │ └── sparql.js │ │ │ ├── spreadsheet │ │ │ │ ├── index.html │ │ │ │ └── spreadsheet.js │ │ │ ├── sql │ │ │ │ ├── index.html │ │ │ │ └── sql.js │ │ │ ├── stex │ │ │ │ ├── index.html │ │ │ │ ├── stex.js │ │ │ │ └── test.js │ │ │ ├── stylus │ │ │ │ ├── index.html │ │ │ │ └── stylus.js │ │ │ ├── tcl │ │ │ │ ├── index.html │ │ │ │ └── tcl.js │ │ │ ├── textile │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── textile.js │ │ │ ├── tiddlywiki │ │ │ │ ├── index.html │ │ │ │ ├── tiddlywiki.css │ │ │ │ └── tiddlywiki.js │ │ │ ├── tiki │ │ │ │ ├── index.html │ │ │ │ ├── tiki.css │ │ │ │ └── tiki.js │ │ │ ├── toml │ │ │ │ ├── index.html │ │ │ │ └── toml.js │ │ │ ├── tornado │ │ │ │ ├── index.html │ │ │ │ └── tornado.js │ │ │ ├── turtle │ │ │ │ ├── index.html │ │ │ │ └── turtle.js │ │ │ ├── vb │ │ │ │ ├── index.html │ │ │ │ └── vb.js │ │ │ ├── vbscript │ │ │ │ ├── index.html │ │ │ │ └── vbscript.js │ │ │ ├── velocity │ │ │ │ ├── index.html │ │ │ │ └── velocity.js │ │ │ ├── verilog │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── verilog.js │ │ │ ├── xml │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── xml.js │ │ │ ├── xquery │ │ │ │ ├── index.html │ │ │ │ ├── test.js │ │ │ │ └── xquery.js │ │ │ ├── yaml │ │ │ │ ├── index.html │ │ │ │ └── yaml.js │ │ │ └── z80 │ │ │ │ ├── index.html │ │ │ │ └── z80.js │ │ ├── modes.min.js │ │ ├── package.json │ │ └── theme │ │ │ ├── 3024-day.css │ │ │ ├── 3024-night.css │ │ │ ├── ambiance-mobile.css │ │ │ ├── ambiance.css │ │ │ ├── base16-dark.css │ │ │ ├── base16-light.css │ │ │ ├── blackboard.css │ │ │ ├── cobalt.css │ │ │ ├── colorforth.css │ │ │ ├── eclipse.css │ │ │ ├── elegant.css │ │ │ ├── erlang-dark.css │ │ │ ├── lesser-dark.css │ │ │ ├── mbo.css │ │ │ ├── mdn-like.css │ │ │ ├── midnight.css │ │ │ ├── monokai.css │ │ │ ├── neat.css │ │ │ ├── neo.css │ │ │ ├── night.css │ │ │ ├── paraiso-dark.css │ │ │ ├── paraiso-light.css │ │ │ ├── pastel-on-dark.css │ │ │ ├── rubyblue.css │ │ │ ├── solarized.css │ │ │ ├── the-matrix.css │ │ │ ├── tomorrow-night-bright.css │ │ │ ├── tomorrow-night-eighties.css │ │ │ ├── twilight.css │ │ │ ├── vibrant-ink.css │ │ │ ├── xq-dark.css │ │ │ ├── xq-light.css │ │ │ └── zenburn.css │ │ ├── flowchart.min.js │ │ ├── jquery.flowchart.min.js │ │ ├── marked.min.js │ │ ├── prettify.min.js │ │ ├── raphael.min.js │ │ ├── sequence-diagram.min.js │ │ └── underscore.min.js ├── fonts │ ├── FontAwesome.otf │ ├── editormd-logo.eot │ ├── editormd-logo.svg │ ├── editormd-logo.ttf │ ├── editormd-logo.woff │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── img │ └── favicon.ico ├── jquery-3.6.0.min.js └── layui │ ├── css │ ├── layui.css │ └── modules │ │ ├── code.css │ │ ├── laydate │ │ └── default │ │ │ └── laydate.css │ │ └── layer │ │ └── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── layer.css │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif │ ├── font │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ ├── iconfont.woff │ └── iconfont.woff2 │ └── layui.js └── templates ├── 404.html ├── home.html └── main.html /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | debug.py -------------------------------------------------------------------------------- /core/AddDigits/AddDigits.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class AddDigits { 4 | public int addDigits(int num) { 5 | while (num >= 10) { 6 | int temp = 0; 7 | while (num != 0) { 8 | temp += num % 10; 9 | num = num / 10; 10 | } 11 | num = temp; 12 | } 13 | return num; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/AddDigits/AddDigits.py: -------------------------------------------------------------------------------- 1 | def addDigits(num: int) -> int: 2 | while num >= 10: 3 | temp = 0 4 | while num != 0: 5 | temp += num % 10 6 | num = num // 10 7 | 8 | num = temp 9 | 10 | return num 11 | 12 | if __name__ == '__main__': 13 | print(addDigits(10)) 14 | -------------------------------------------------------------------------------- /core/ArrayOfDoubledPairs/ArrayOfDoubledPairs.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from collections import Counter 3 | 4 | 5 | def canReorderDoubled(arr: List[int]) -> bool: 6 | counter = Counter(arr) 7 | for num in sorted(counter, key=lambda k: abs(k)): 8 | if counter[num * 2] < counter[num]: 9 | return False 10 | counter[num * 2] -= counter[num] 11 | 12 | return True 13 | 14 | if __name__ == '__main__': 15 | print(canReorderDoubled([-1,2])) 16 | -------------------------------------------------------------------------------- /core/Base7/Base7.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class Base7 { 4 | public String convertToBase7(int num) { 5 | if (num == 0) { 6 | return "0"; 7 | } 8 | 9 | StringBuffer res = new StringBuffer(); 10 | int temp = Math.abs(num); 11 | while (temp != 0) { 12 | res.append(temp % 7); 13 | temp /= 7; 14 | } 15 | 16 | return num >= 0 ? res.reverse().toString() : res.append("-").reverse().toString(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/Base7/Base7.py: -------------------------------------------------------------------------------- 1 | def convertToBase7(num: int) -> str: 2 | if num == 0: 3 | return "0" 4 | 5 | res = "" 6 | temp = abs(num) 7 | while temp != 0: 8 | res = str(temp % 7) + res 9 | 10 | temp = temp // 7 11 | 12 | return res if num >= 0 else f"-{res}" 13 | 14 | 15 | if __name__ == '__main__': 16 | print(convertToBase7(0)) 17 | -------------------------------------------------------------------------------- /core/BestTimeToBuyAndSellStock/BestTimeToBuyAndSellStock.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class BestTimeToBuyAndSellStock { 4 | public int maxProfit(int[] prices) { 5 | int buy = -prices[0], sell = 0; 6 | int res = sell; 7 | for (int i = 1; i < prices.length; i++) { 8 | sell = Math.max(sell, buy + prices[i]); 9 | buy = Math.max(buy, -prices[i]); 10 | res = Math.max(res, sell); 11 | } 12 | return res; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/BestTimeToBuyAndSellStock/BestTimeToBuyAndSellStock.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def maxProfit(prices: List[int]) -> int: 4 | buy, sell = -prices[0], 0 5 | res = sell 6 | for i in range(1, len(prices)): 7 | temp_buy = buy 8 | buy = max(buy, -prices[i]) 9 | sell = max(sell, temp_buy + prices[i]) 10 | res = max(res, sell) 11 | 12 | return res 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/BestTimeToBuyAndSellStockII/BestTimeToBuyAndSellStockII.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class BestTimeToBuyAndSellStockII { 4 | public int maxProfit(int[] prices) { 5 | int sell = 0, buy = -prices[0]; 6 | for (int price : prices) { 7 | int temp = sell; 8 | sell = Math.max(sell, buy + price); 9 | buy = Math.max(buy, temp - price); 10 | } 11 | return sell; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/BestTimeToBuyAndSellStockII/BestTimeToBuyAndSellStockII.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maxProfit(prices: List[int]) -> int: 5 | sell, buy, days = 0, -prices[0], len(prices) 6 | for day in range(days): 7 | temp = sell 8 | sell = max(sell, buy + prices[day]) 9 | buy = max(buy, temp - prices[day]) 10 | 11 | return sell 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /core/BinaryNumberWithAlternatingBits/BinaryNumberWithAlternatingBits.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class BinaryNumberWithAlternatingBits { 4 | public boolean hasAlternatingBits(int n) { 5 | int flag = -1; 6 | while (n != 0) { 7 | if (flag != -1 && flag == n % 2) return false; 8 | flag = n % 2; 9 | n >>= 1; 10 | } 11 | return true; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/BinaryNumberWithAlternatingBits/BinaryNumberWithAlternatingBits.py: -------------------------------------------------------------------------------- 1 | def hasAlternatingBits(n: int) -> bool: 2 | flag = -1 3 | while n != 0: 4 | if flag != -1 and flag == n % 2: 5 | return False 6 | flag = n % 2 7 | n >>= 1 8 | 9 | return True 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/ClimbingStairs/ClimbingStairs.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class ClimbingStairs { 4 | public int climbStairs(int n) { 5 | if (n < 4) return n; 6 | int pre = 2, cur = 3; 7 | for (int i = 3; i < n; i++) { 8 | int temp = cur; 9 | cur += pre; 10 | pre = temp; 11 | } 12 | return cur; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/ClimbingStairs/ClimbingStairs.py: -------------------------------------------------------------------------------- 1 | def climbStairs(n: int) -> int: 2 | if n < 4: 3 | return n 4 | pre, cur = 2, 3 5 | for _ in range(3, n): 6 | temp = cur 7 | cur = pre + cur 8 | pre = temp 9 | 10 | return cur 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /core/CoinChange2/CoinChange2.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class CoinChange2 { 4 | public int change(int amount, int[] coins) { 5 | int[] dp = new int[amount + 1]; 6 | dp[0] = 1; 7 | for (int coin : coins) { 8 | for (int i = coin; i <= amount; i++) { 9 | dp[i] += dp[i - coin]; 10 | } 11 | } 12 | return dp[amount]; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/CoinChange2/CoinChange2.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def change(amount: int, coins: List[int]) -> int: 5 | dp = [0] * (amount + 1) 6 | dp[0] = 1 7 | for coin in coins: 8 | for i in range(coin, amount + 1): 9 | dp[i] += dp[i - coin] 10 | 11 | return dp[amount] 12 | 13 | 14 | if __name__ == '__main__': 15 | print(change(500, [3,5,7,8,9,10,11])) 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/CompareVersionNumbers/CompareVersionNumbers.py: -------------------------------------------------------------------------------- 1 | def compareVersion(version1: str, version2: str) -> int: 2 | v1 = [int(item) for item in version1.split(".")] 3 | v2 = [int(item) for item in version2.split(".")] 4 | len1, len2 = len(v1), len(v2) 5 | for index in range(max(len1, len2)): 6 | val1 = v1[index] if index < len1 else 0 7 | val2 = v2[index] if index < len2 else 0 8 | if val1 != val2: 9 | return 1 if val1 > val2 else -1 10 | 11 | return 0 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/ContainerWithMostWater/ContainerWithMostWater.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | public class ContainerWithMostWater { 4 | public int maxArea(int[] height) { 5 | int left = 0, right = height.length - 1, res = 0; 6 | while (left < right) { 7 | res = Math.max(res, (right - left) * Math.min(height[left], height[right])); 8 | if (height[left] < height[right]) left++; 9 | else right--; 10 | } 11 | return res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/ContainerWithMostWater/ContainerWithMostWater.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maxArea(height: List[int]) -> int: 5 | left, right = 0, len(height) - 1 6 | res = 0 7 | while left < right: 8 | res = max(res, (right - left) * min(height[left], height[right])) 9 | if height[left] < height[right]: 10 | left += 1 11 | else: 12 | right -= 1 13 | 14 | return res 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/CountNumbersWithUniqueDigits/CountNumbersWithUniqueDigits.py: -------------------------------------------------------------------------------- 1 | def countNumbersWithUniqueDigits(n: int) -> int: 2 | if n == 0: 3 | return 1 4 | res = 1 5 | for i in range(1, n + 1): 6 | mid, start = 9, 9 7 | while i > 1: 8 | mid *= start 9 | i -= 1 10 | start -= 1 11 | 12 | res += mid 13 | 14 | return res 15 | 16 | 17 | if __name__ == '__main__': 18 | print(countNumbersWithUniqueDigits(3)) 19 | -------------------------------------------------------------------------------- /core/DecodeWays/DecodeWays.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/DecodeWays/DecodeWays.java -------------------------------------------------------------------------------- /core/DecodeWays/DecodeWays.py: -------------------------------------------------------------------------------- 1 | def numDecodings(s: str) -> int: 2 | dp = [1] + [0] * len(s) 3 | for index in range(1, len(s) + 1): 4 | if s[index - 1] != "0": 5 | dp[index] = dp[index - 1] 6 | if index > 1 and s[index - 2] != "0" and 0 < int(s[index - 2:index]) <= 26: 7 | dp[index] += dp[index - 2] 8 | 9 | return dp[-1] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/DeleteColumnsToMakeSorted/DeleteColumnsToMakeSorted.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def minDeletionSize(strs: List[str]) -> int: 5 | rows, cols = len(strs), len(strs[0]) 6 | count = 0 7 | for col in range(cols): 8 | for row in range(rows): 9 | if row != 0 and ord(strs[row][col]) < ord(strs[row - 1][col]): 10 | count += 1 11 | break 12 | 13 | return count 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/DuplicateZeros/DuplicateZeros.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | import java.util.ArrayDeque; 4 | import java.util.Queue; 5 | 6 | public class DuplicateZeros { 7 | public void duplicateZeros(int[] arr) { 8 | Queue queue = new ArrayDeque<>(); 9 | for (int i = 0; i < arr.length; i++) { 10 | if (arr[i] == 0) queue.offer(0); 11 | queue.offer(arr[i]); 12 | arr[i] = queue.poll(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/DuplicateZeros/DuplicateZeros.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from collections import deque 3 | 4 | 5 | def duplicateZeros(arr: List[int]) -> None: 6 | queue, length = deque(), len(arr) 7 | 8 | for index in range(length): 9 | if arr[index] == 0: 10 | queue.append(0) 11 | queue.append(arr[index]) 12 | arr[index] = queue.popleft() 13 | -------------------------------------------------------------------------------- /core/ErChaShuDeJingXiangLcof/ErChaShuDeJingXiangLcof.py: -------------------------------------------------------------------------------- 1 | class TreeNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.left = None 5 | self.right = None 6 | 7 | 8 | def mirrorTree(root: TreeNode) -> TreeNode: 9 | if root is None: 10 | return root 11 | 12 | left_node = mirrorTree(root.left) 13 | right_node = mirrorTree(root.right) 14 | root.left, root.right = right_node, left_node 15 | return root 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/FactorialTrailingZeroes/FactorialTrailingZeroes.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class FactorialTrailingZeroes { 4 | public int trailingZeroes(int n) { 5 | int res = 0; 6 | while (n != 0) { 7 | n /= 5; 8 | res += n; 9 | } 10 | return res; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/FactorialTrailingZeroes/FactorialTrailingZeroes.py: -------------------------------------------------------------------------------- 1 | def trailingZeroes(n: int) -> int: 2 | res = 0 3 | for i in range(5, n + 1, 5): 4 | while i % 5 == 0: 5 | res += 1 6 | i //= 5 7 | 8 | return res 9 | 10 | 11 | if __name__ == '__main__': 12 | print(trailingZeroes(30)) 13 | -------------------------------------------------------------------------------- /core/FindAllNumbersDisappearedInAnArray/FindAllNumbersDisappearedInAnArray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def findDisappearedNumbers(nums: List[int]) -> List[int]: 5 | res, length = [], len(nums) 6 | for num in nums: 7 | num = abs(num) 8 | nums[num - 1] = -abs(nums[num - 1]) 9 | 10 | for index in range(length): 11 | if nums[index] > 0: 12 | res.append(index + 1) 13 | 14 | return res 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/FindTheDuplicateNumber/FindTheDuplicateNumber.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def findDuplicate(nums: List[int]) -> int: 5 | slow, fast = nums[0], nums[nums[0]] 6 | while slow != fast: 7 | slow = nums[slow] 8 | fast = nums[nums[fast]] 9 | slow = 0 10 | while slow != fast: 11 | slow = nums[slow] 12 | fast = nums[fast] 13 | 14 | return slow 15 | 16 | -------------------------------------------------------------------------------- /core/FindTheWinnerOfTheCircularGame/FindTheWinnerOfTheCircularGame.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class FindTheWinnerOfTheCircularGame { 4 | public int findTheWinner(int n, int k) { 5 | int winner = 1; 6 | for (int i = 2; i <= n; i++) { 7 | winner = (winner + k - 1) % i + 1; 8 | } 9 | return winner; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/FindTheWinnerOfTheCircularGame/FindTheWinnerOfTheCircularGame.py: -------------------------------------------------------------------------------- 1 | def findTheWinner(n: int, k: int) -> int: 2 | # winner = 1 3 | # for i in range(2, n + 1): 4 | # winner = (winner + k - 1) % i + 1 5 | # 6 | # return winner 7 | if n == 1: 8 | return 1 9 | return (findTheWinner(n - 1, k) + k - 1) % n + 1 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/FlipStringToMonotoneIncreasing/FlipStringToMonotoneIncreasing.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class FlipStringToMonotoneIncreasing { 4 | public int minFlipsMonoIncr(String s) { 5 | int dp0 = 0, dp1 = 0; 6 | for (int i = 0; i < s.length(); i++) { 7 | dp1 = Math.min(dp0, dp1); 8 | if (s.charAt(i) == '0') { 9 | dp1++; 10 | } else dp0++; 11 | } 12 | return Math.min(dp0, dp1); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/FlipStringToMonotoneIncreasing/FlipStringToMonotoneIncreasing.py: -------------------------------------------------------------------------------- 1 | def minFlipsMonoIncr(s: str) -> int: 2 | dp0 = dp1 = 0 3 | for ch in s: 4 | dp0_new, dp1_new = dp0, min(dp0, dp1) 5 | if ch == "1": 6 | dp0_new += 1 7 | else: 8 | dp1_new += 1 9 | dp0, dp1 = dp0_new, dp1_new 10 | 11 | return min(dp0, dp1) 12 | 13 | 14 | if __name__ == '__main__': 15 | print(minFlipsMonoIncr("10011111110010111011")) 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/HappyNumber/HappyNumber.py: -------------------------------------------------------------------------------- 1 | def isHappy(n: int) -> bool: 2 | remain = {n} 3 | while n != 1: 4 | temp = 0 5 | while n != 0: 6 | temp += pow((n % 10), 2) 7 | n = n // 10 8 | n = temp 9 | if n in remain: 10 | return False 11 | remain.add(n) 12 | 13 | return True 14 | 15 | 16 | if __name__ == '__main__': 17 | print(isHappy(2)) 18 | -------------------------------------------------------------------------------- /core/HeightChecker/HeightChecker.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | import java.util.Arrays; 4 | 5 | public class HeightChecker { 6 | public int heightChecker(int[] heights) { 7 | int[] remain = heights.clone(); 8 | int res = 0; 9 | Arrays.sort(remain); 10 | for (int i = 0; i < heights.length; i++) { 11 | if (heights[i] != remain[i]) res++; 12 | } 13 | return res; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/HeightChecker/HeightChecker.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from copy import deepcopy 3 | 4 | 5 | def heightChecker(heights: List[int]) -> int: 6 | remain = deepcopy(heights) 7 | remain.sort() 8 | return len([item1 for item1, item2 in zip(heights, remain) if item1 != item2]) 9 | -------------------------------------------------------------------------------- /core/HouseRobber/HouseRobber.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class HouseRobber { 4 | public int rob(int[] nums) { 5 | int[] dp = new int[nums.length]; 6 | for (int i = 0; i < nums.length; i++) { 7 | int prePreHouse = i - 2 < 0 ? 0 : dp[i - 2]; 8 | int preHouse = i - 1 < 0 ? 0 : dp[i - 1]; 9 | dp[i] = Math.max(nums[i] + prePreHouse, preHouse); 10 | } 11 | return dp[nums.length - 1]; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/HouseRobber/HouseRobber.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def rob(nums: List[int]) -> int: 5 | length = len(nums) 6 | dp = [0] * length 7 | for index in range(length): 8 | pre_pre_house = 0 if index - 2 < 0 else dp[index - 2] 9 | pre_house = 0 if index - 1 < 0 else dp[index - 1] 10 | dp[index] = max(pre_pre_house + nums[index], pre_house) 11 | 12 | return dp[-1] 13 | -------------------------------------------------------------------------------- /core/ImplementRand10UsingRand7/ImplementRand10UsingRand7.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class ImplementRand10UsingRand7 { 4 | public int rand7() { 5 | return 0; 6 | } 7 | 8 | public int rand10() { 9 | while (true) { 10 | int row = rand7(), col = rand7(); 11 | int idx = (row - 1) * 7 + col; 12 | if (idx <= 40) return 1 + (idx - 1) % 10; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/ImplementRand10UsingRand7/ImplementRand10UsingRand7.py: -------------------------------------------------------------------------------- 1 | def rand7(): 2 | pass 3 | 4 | 5 | def rand10(): 6 | while True: 7 | row, col = rand7(), rand7() 8 | idx = (row - 1) * 7 + col 9 | if idx <= 40: 10 | return 1 + (idx - 1) % 10 11 | -------------------------------------------------------------------------------- /core/IntersectionOfTwoLinkedLists/IntersectionOfTwoLinkedLists.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.next = None 5 | 6 | 7 | def getIntersectionNode(headA: ListNode, headB: ListNode) -> ListNode: 8 | if headA is None or headB is None: 9 | return None 10 | remainA, remainB = headA, headB 11 | while headA != headB: 12 | headA = headB if headA is None else headA 13 | headB = headA if headB is None else headB 14 | 15 | return headA 16 | -------------------------------------------------------------------------------- /core/InvertBinaryTree/InvertBinaryTree.py: -------------------------------------------------------------------------------- 1 | class TreeNode: 2 | def __init__(self, val=0, left=None, right=None): 3 | self.val = val 4 | self.left = left 5 | self.right = right 6 | 7 | 8 | def invertTree(root: TreeNode) -> TreeNode: 9 | if not root: 10 | return root 11 | left_node = invertTree(root.left) 12 | right_node = invertTree(root.right) 13 | root.left = right_node 14 | root.right = left_node 15 | return root 16 | -------------------------------------------------------------------------------- /core/JEj789/JEj789.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def minCost(costs: List[List[int]]) -> int: 5 | first, second, third = 0, 0, 0 6 | for item1, item2, item3 in costs: 7 | item1 += min(second, third) 8 | item2 += min(first, third) 9 | item3 += min(first, second) 10 | first, second, third = item1, item2, item3 11 | 12 | return min(first, min(second, third)) 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/JumpGame/JumpGame.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | public class JumpGame { 4 | public boolean canJump(int[] nums) { 5 | int left = nums.length - 1, right = nums.length - 1; 6 | while (left >= 0) { 7 | if (nums[left] + left >= right) right = left; 8 | left--; 9 | } 10 | return right == 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/JumpGame/JumpGame.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def canJump(nums: List[int]) -> bool: 5 | left, right = len(nums) - 1, len(nums) - 1 6 | while left >= 0: 7 | if nums[left] + left >= right: 8 | right = left 9 | left -= 1 10 | 11 | return right == 0 12 | 13 | 14 | -------------------------------------------------------------------------------- /core/LexicographicalNumbers/LexicographicalNumbers.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def lexicalOrder(n: int) -> List[int]: 5 | res = [] 6 | 7 | def order(num): 8 | for i in range(10): 9 | if num * 10 + i > n: 10 | return 11 | res.append(num * 10 + i) 12 | order(num * 10 + i) 13 | 14 | for k in range(1, 10): 15 | if k > n: 16 | break 17 | res.append(k) 18 | order(k) 19 | 20 | return res 21 | 22 | 23 | -------------------------------------------------------------------------------- /core/LianXuZiShuZuDeZuiDaHeLcof/LianXuZiShuZuDeZuiDaHeLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | public class LianXuZiShuZuDeZuiDaHeLcof { 4 | public int maxSubArray(int[] nums) { 5 | int min = nums[0], res = nums[0], total = nums[0]; 6 | for (int i = 1; i < nums.length; i++) { 7 | total += nums[i]; 8 | res = Math.max(res, total - min); 9 | min = Math.min(min, total); 10 | } 11 | return res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/LianXuZiShuZuDeZuiDaHeLcof/LianXuZiShuZuDeZuiDaHeLcof.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maxSubArray(nums: List[int]) -> int: 5 | res, pre = nums[0], nums[0] 6 | for i in range(1, len(nums)): 7 | pre = max(nums[i], pre + nums[i]) 8 | res = max(res, pre) 9 | 10 | return res 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /core/LinkedListCycle/LinkedListCycle.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | class ListNode: 4 | def __init__(self, x): 5 | self.val = x 6 | self.next = None 7 | 8 | 9 | def hasCycle(head: Optional[ListNode]) -> bool: 10 | while head: 11 | if head.val > 100000: 12 | return True 13 | head.val += 2000001 14 | head = head.next 15 | 16 | return False 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/LongestUncommonSubsequenceI/LongestUncommonSubsequenceI.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class LongestUncommonSubsequenceI { 4 | public int findLUSlength(String a, String b) { 5 | if (a.equals(b)) { 6 | return -1; 7 | } 8 | 9 | return Math.max(a.length(), b.length()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/LongestUncommonSubsequenceI/LongestUncommonSubsequenceI.py: -------------------------------------------------------------------------------- 1 | def findLUSlength(a: str, b: str) -> int: 2 | if a == b: 3 | return -1 4 | 5 | return len(a) if len(a) > len(b) else len(b) 6 | -------------------------------------------------------------------------------- /core/LongestWordInDictionary/LongestWordInDictionary.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def longestWord(words: List[str]) -> str: 5 | set_words = {""} 6 | words.sort(key=lambda x: (-len(x), x), reverse=True) 7 | res = "" 8 | for word in words: 9 | if word[:-1] in set_words: 10 | res = word 11 | set_words.add(word) 12 | 13 | return res 14 | 15 | 16 | if __name__ == '__main__': 17 | print(longestWord(words=["a", "banana", "app", "appl", "ap", "apply", "apple"])) 18 | -------------------------------------------------------------------------------- /core/LuckyNumbersInAMatrix/LuckyNumbersInAMatrix.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def luckyNumbers(matrix: List[List[int]]) -> List[int]: 5 | ans = [] 6 | for row in matrix: 7 | for j, x in enumerate(row): 8 | if max(r[j] for r in matrix) <= x <= min(row): 9 | ans.append(x) 10 | return ans 11 | -------------------------------------------------------------------------------- /core/MajorityElement/MajorityElement.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def majorityElement(nums: List[int]) -> int: 5 | num, count, length = nums[0], 1, len(nums) 6 | 7 | for i in range(1, length): 8 | if count == 0: 9 | num = nums[i] 10 | count = 1 11 | elif nums[i] == num: 12 | count += 1 13 | else: 14 | count -= 1 15 | 16 | return num 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/MaxAreaOfIsland/MaxAreaOfIsland.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/MaxAreaOfIsland/MaxAreaOfIsland.java -------------------------------------------------------------------------------- /core/MaximumDepthOfBinaryTree/MaximumDepthOfBinaryTree.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | 4 | class TreeNode: 5 | def __init__(self, val=0, left=None, right=None): 6 | self.val = val 7 | self.left = left 8 | self.right = right 9 | 10 | 11 | def maxDepth(root: Optional[TreeNode]) -> int: 12 | if not root: 13 | return 0 14 | return max(maxDepth(root.left), maxDepth(root.right)) + 1 15 | -------------------------------------------------------------------------------- /core/MaximumDifferenceBetweenIncreasingElements/MaximumDifferenceBetweenIncreasingElements.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maximumDifference(nums: List[int]) -> int: 5 | min_num, div_num = nums[0], -1 6 | for i in range(1, len(nums)): 7 | if nums[i] > min_num and nums[i] - min_num > div_num: 8 | div_num = nums[i] - min_num 9 | min_num = min_num if min_num < nums[i] else nums[i] 10 | 11 | return div_num 12 | -------------------------------------------------------------------------------- /core/MaximumProductSubarray/MaximumProductSubarray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maxProduct(nums: List[int]) -> int: 5 | pre_min, pre_max = nums[0], nums[0] 6 | length, res = len(nums), nums[0] 7 | for i in range(1, length): 8 | pre_max, pre_min = max(max(nums[i] * pre_min, nums[i] * pre_max), nums[i]), min(min(nums[i] * pre_min, nums[i] * pre_max), nums[i]) 9 | res = max(res, pre_max) 10 | 11 | return res 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/MaximumSubarray/MaximumSubarray.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class MaximumSubarray { 4 | public int maxSubArray(int[] nums) { 5 | int res = nums[0], prev = nums[0]; 6 | for (int i = 1; i < nums.length; i++) { 7 | prev = Math.max(nums[i], prev + nums[i]); 8 | res = Math.max(res, prev); 9 | } 10 | return res; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/MaximumSubarray/MaximumSubarray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def maxSubArray(nums: List[int]) -> int: 5 | res, prev = nums[0], nums[0] 6 | for i in range(1, len(nums)): 7 | prev = max(nums[i], nums[i] + prev) 8 | res = max(res, prev) 9 | 10 | return res 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/MinimumCostForTickets/MinimumCostForTickets.py: -------------------------------------------------------------------------------- 1 | import functools 2 | from typing import List 3 | 4 | 5 | def mincostTickets(days: List[int], costs: List[int]) -> int: 6 | dayset = set(days) 7 | durations = [1, 7, 30] 8 | 9 | @functools.lru_cache(None) 10 | def dp(i): 11 | if i > 365: 12 | return 0 13 | elif i in dayset: 14 | return min(dp(i + d) + c for c, d in zip(costs, durations)) 15 | else: 16 | return dp(i + 1) 17 | 18 | return dp(1) 19 | -------------------------------------------------------------------------------- /core/MinimumCostToMoveChipsToTheSamePosition/MinimumCostToMoveChipsToTheSamePosition.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/MinimumCostToMoveChipsToTheSamePosition/MinimumCostToMoveChipsToTheSamePosition.java -------------------------------------------------------------------------------- /core/MinimumCostToMoveChipsToTheSamePosition/MinimumCostToMoveChipsToTheSamePosition.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def minCostToMoveChips(position: List[int]) -> int: 5 | odd_count, count = 0, 0 6 | for num in position: 7 | if num % 2 == 0: 8 | odd_count += 1 9 | else: 10 | count += 1 11 | 12 | return min(odd_count, count) 13 | 14 | 15 | -------------------------------------------------------------------------------- /core/MinimumDifferenceBetweenHighestAndLowestOfKScores/MinimumDifferenceBetweenHighestAndLowestOfKScores.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | import heapq 3 | 4 | 5 | def minimumDifference(nums: List[int], k: int) -> int: 6 | nums.sort() 7 | right, res = k - 1, 100000 8 | while right < len(nums): 9 | res = min(res, nums[right] - nums[right - k + 1]) 10 | right += 1 11 | 12 | return res 13 | 14 | 15 | if __name__ == '__main__': 16 | print(minimumDifference([9, 4, 1, 7], 2)) 17 | -------------------------------------------------------------------------------- /core/MinimumMovesToEqualArrayElements/MinimumMovesToEqualArrayElements.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | import java.util.Arrays; 4 | 5 | public class MinimumMovesToEqualArrayElements { 6 | public int minMoves(int[] nums) { 7 | int minNum = Arrays.stream(nums).min().getAsInt(); 8 | int res = 0; 9 | for (int num : nums) res += Math.abs(num - minNum); 10 | return res; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/MinimumMovesToEqualArrayElements/MinimumMovesToEqualArrayElements.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def minMoves(nums: List[int]) -> int: 5 | min_num = min(nums) 6 | return sum([abs(num - min_num) for num in nums]) 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /core/MoveZeroes/MoveZeroes.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def moveZeroes(nums: List[int]) -> None: 5 | point, cur, length = 0, 0, len(nums) 6 | while cur < length: 7 | while cur < length and nums[cur] == 0: 8 | cur += 1 9 | if cur < length: 10 | nums[point], nums[cur] = nums[cur], nums[point] 11 | point += 1 12 | cur += 1 13 | -------------------------------------------------------------------------------- /core/MyCalendarI/MyCalendarI.py: -------------------------------------------------------------------------------- 1 | from sortedcontainers import SortedDict 2 | 3 | class MyCalendar: 4 | def __init__(self): 5 | self.booked = SortedDict() 6 | 7 | def book(self, start: int, end: int) -> bool: 8 | i = self.booked.bisect_left(end) 9 | if i == 0 or self.booked.items()[i - 1][1] <= start: 10 | self.booked[start] = end 11 | return True 12 | return False -------------------------------------------------------------------------------- /core/NAryTreePostorderTraversal/NAryTreePostorderTraversal.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | class Node: 5 | def __init__(self, val=None, children=None): 6 | self.val = val 7 | self.children = children 8 | 9 | 10 | def postorder(root: 'Node') -> List[int]: 11 | if root == None: 12 | return [] 13 | 14 | res = [] 15 | for node in root.children: 16 | res.extend(postorder(node)) 17 | res.append(root.val) 18 | return res 19 | -------------------------------------------------------------------------------- /core/NAryTreePreorderTraversal/NAryTreePreorderTraversal.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | class Node: 5 | def __init__(self, val=None, children=None): 6 | self.val = val 7 | self.children = children 8 | 9 | 10 | def preorder(root: Node) -> List[int]: 11 | if root == None: 12 | return [] 13 | 14 | res = [root.val] 15 | for node in root.children: 16 | res.extend(preorder(node)) 17 | 18 | return res 19 | -------------------------------------------------------------------------------- /core/NRepeatedElementInSize2nArray/NRepeatedElementInSize2nArray.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | import java.util.Random; 4 | 5 | public class NRepeatedElementInSize2nArray { 6 | public int repeatedNTimes(int[] nums) { 7 | Random random = new Random(); 8 | while (true) { 9 | int x = random.nextInt(nums.length); 10 | int y = random.nextInt(nums.length); 11 | if (x != y && nums[x] == nums[y]) return nums[x]; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/NRepeatedElementInSize2nArray/NRepeatedElementInSize2nArray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | import random 3 | 4 | 5 | def repeatedNTimes(nums: List[int]) -> int: 6 | while True: 7 | x, y = random.randint(0, len(nums) - 1), random.randint(0, len(nums) - 1) 8 | if x != y and nums[x] == nums[y]: 9 | return nums[x] 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /core/NumberOfLinesToWriteString/NumberOfLinesToWriteString.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def numberOfLines(widths: List[int], s: str) -> List[int]: 4 | row, remain, line = 0, 0, 0 5 | for ch in s: 6 | if widths[ord(ch) - 97] + line > 100: 7 | line = widths[ord(ch) - 97] 8 | row += 1 9 | else: 10 | line += widths[ord(ch) - 97] 11 | 12 | if line > 0: 13 | row += 1 14 | 15 | return [row, line] 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/NumberOfRecentCalls/NumberOfRecentCalls.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | import java.util.Deque; 4 | import java.util.LinkedList; 5 | 6 | public class NumberOfRecentCalls { 7 | Deque queue = new LinkedList<>(); 8 | public NumberOfRecentCalls() { 9 | 10 | } 11 | 12 | public int ping(int t) { 13 | this.queue.addLast(t); 14 | while (this.queue.peekFirst() < t - 3000) this.queue.pollFirst(); 15 | return this.queue.size(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/NumberOfRecentCalls/NumberOfRecentCalls.py: -------------------------------------------------------------------------------- 1 | from collections import deque 2 | 3 | 4 | class RecentCounter: 5 | def __init__(self): 6 | self.queue = deque() 7 | 8 | def ping(self, t: int) -> int: 9 | self.queue.append(t) 10 | while self.queue[0] < t - 3000: 11 | self.queue.popleft() 12 | return len(self.queue) 13 | -------------------------------------------------------------------------------- /core/OptimalDivision/OptimalDivision.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def optimalDivision(nums: List[int]) -> str: 5 | if len(nums) == 1: 6 | return str(nums[0]) 7 | if len(nums) == 2: 8 | return f"{nums[0]}/{nums[1]}" 9 | return f"{nums[0]}/({'/'.join(map(str, nums[1:]))})" 10 | -------------------------------------------------------------------------------- /core/PalindromeNumber/PalindromeNumber.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | public class PalindromeNumber { 4 | public boolean isPalindrome(int x) { 5 | if (x < 0 || (x % 10 == 0 && x != 0)) return false; 6 | int revertedNum = 0; 7 | while (revertedNum < x) { 8 | revertedNum = revertedNum * 10 + x % 10; 9 | x /= 10; 10 | } 11 | return revertedNum == x || x == revertedNum / 10; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/PalindromeNumber/PalindromeNumber.py: -------------------------------------------------------------------------------- 1 | def isPalindrome(x: int) -> bool: 2 | if x < 0 or (x % 10 == 0 and x != 0): 3 | return False 4 | 5 | reverted_num = 0 6 | while x > reverted_num: 7 | reverted_num = reverted_num * 10 + x % 10 8 | x //= 10 9 | 10 | return x == reverted_num or x == reverted_num // 10 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /core/PowxN/PowxN.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class PowxN { 4 | private double cal(double x, int n) { 5 | if (n == 0) return 1; 6 | return n % 2 == 0 ? cal(x * x, n / 2) : cal(x * x, n / 2) * x; 7 | } 8 | 9 | public double myPow(double x, int n) { 10 | double res = cal(x, Math.abs(n)); 11 | return n >= 0 ? res : 1 / res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/PowxN/PowxN.py: -------------------------------------------------------------------------------- 1 | def myPow(x: float, n: int) -> float: 2 | def cal(num, count): 3 | if count == 0: 4 | return 1 5 | return cal(num * num, count // 2) * (1 if count % 2 == 0 else num) 6 | res = cal(x, abs(n)) 7 | if n >= 0: 8 | return res 9 | else: 10 | return 1 / res 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /core/QingWaTiaoTaiJieWenTiLcof/QingWaTiaoTaiJieWenTiLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class QingWaTiaoTaiJieWenTiLcof { 4 | public int numWays(int n) { 5 | long pre = 1, cur = 1; 6 | for (int i = 2; i < n + 1; i++) { 7 | long temp = cur; 8 | cur = (cur + pre) % 1000000007; 9 | pre = temp; 10 | } 11 | return (int) cur; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/QingWaTiaoTaiJieWenTiLcof/QingWaTiaoTaiJieWenTiLcof.py: -------------------------------------------------------------------------------- 1 | def numWays(n: int) -> int: 2 | pre, cur = 1, 1 3 | for i in range(2, n + 1): 4 | cur, pre = cur + pre, cur 5 | 6 | return cur % 1000000007 7 | 8 | 9 | if __name__ == '__main__': 10 | print(numWays(5)) 11 | 12 | -------------------------------------------------------------------------------- /core/RandomPickIndex/RandomPickIndex.py: -------------------------------------------------------------------------------- 1 | from random import choice 2 | from typing import List 3 | 4 | 5 | class Solution: 6 | 7 | def __init__(self, nums: List[int]): 8 | self.remain = {} 9 | for index, num in enumerate(nums): 10 | if num not in self.remain: 11 | self.remain[num] = [index] 12 | else: 13 | self.remain[num].append(index) 14 | 15 | def pick(self, target: int) -> int: 16 | return choice(self.remain[target]) 17 | -------------------------------------------------------------------------------- /core/ReachingPoints/ReachingPoints.py: -------------------------------------------------------------------------------- 1 | def reachingPoints(sx: int, sy: int, tx: int, ty: int) -> bool: 2 | while tx > sx and ty > sy and tx != ty: 3 | if tx > ty: 4 | tx %= ty 5 | else: 6 | ty %= tx 7 | 8 | if tx == sx and ty == sy: 9 | return True 10 | elif tx > sx and ty == sy: 11 | return (tx - sx) % ty == 0 12 | elif ty > sy and tx == sx: 13 | return (ty - sy) % tx == 0 14 | else: 15 | return False 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /core/RemoveDuplicatesFromSortedArray/RemoveDuplicatesFromSortedArray.java: -------------------------------------------------------------------------------- 1 | package com.dbc.code; 2 | 3 | public class RemoveDuplicatesFromSortedArray { 4 | public int removeDuplicates(int[] nums) { 5 | int slow = 1, fast = 1; 6 | while (fast < nums.length) { 7 | if (nums[fast] != nums[fast - 1]) { 8 | nums[slow] = nums[fast]; 9 | slow++; 10 | } 11 | fast++; 12 | } 13 | return slow; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/RemoveDuplicatesFromSortedArray/RemoveDuplicatesFromSortedArray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def removeDuplicates(nums: List[int]) -> int: 5 | left, right, length = 0, 0, len(nums) 6 | while right < length: 7 | while right < length and nums[left] == nums[right]: 8 | right += 1 9 | if right < length and right > left + 1: 10 | nums[left + 1] = nums[right] 11 | left += 1 12 | 13 | return left 14 | -------------------------------------------------------------------------------- /core/RemoveDuplicatesFromSortedList/RemoveDuplicatesFromSortedList.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, val=0, next=None): 3 | self.val = val 4 | self.next = next 5 | 6 | def deleteDuplicates(head: ListNode) -> ListNode: 7 | cur = head 8 | while cur: 9 | while cur.next and cur.val == cur.next.val: 10 | cur.next = cur.next.next 11 | cur = cur.next 12 | 13 | return head 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /core/RemoveElement/RemoveElement.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class RemoveElement { 4 | public int removeElement(int[] nums, int val) { 5 | int point = 0, cur = 0; 6 | while (cur < nums.length) { 7 | if (nums[cur] != val) { 8 | int temp = nums[cur]; 9 | nums[cur] = nums[point]; 10 | nums[point] = temp; 11 | point++; 12 | } 13 | cur++; 14 | } 15 | return point; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/RemoveElement/RemoveElement.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def removeElement(nums: List[int], val: int) -> int: 5 | point, cur, length = 0, 0, len(nums) 6 | while cur < length: 7 | if nums[cur] != val: 8 | nums[cur], nums[point] = nums[point], nums[cur] 9 | point += 1 10 | cur += 1 11 | return point 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/RemoveKDigits/RemoveKDigits.py: -------------------------------------------------------------------------------- 1 | def removeKdigits(num: str, k: int) -> str: 2 | num_stack = [] 3 | for digit in num: 4 | while k and num_stack and num_stack[-1] > digit: 5 | num_stack.pop() 6 | k -= 1 7 | 8 | num_stack.append(digit) 9 | 10 | final = num_stack[:-k] if k else num_stack 11 | return "".join(final).lstrip("0") or "0" 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/RemoveOutermostParentheses/RemoveOutermostParentheses.py: -------------------------------------------------------------------------------- 1 | def removeOuterParentheses(s: str) -> str: 2 | res, stack, length = "", [], len(s) 3 | for index, ch in enumerate(s): 4 | if ch == "(": 5 | stack.append(index) 6 | else: 7 | pre_index = stack.pop() 8 | if not stack: 9 | res += s[pre_index + 1:index] 10 | return res 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/ReorderDataInLogFiles/ReorderDataInLogFiles.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def reorderLogFiles(logs: List[str]) -> List[str]: 5 | def trans(log): 6 | a, b = log.split(" ", 1) 7 | return (0, b, a) if b[0].isalpha() else (1,) 8 | 9 | logs.sort(key=trans) 10 | return logs 11 | -------------------------------------------------------------------------------- /core/ReverseInteger/ReverseInteger.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class ReverseInteger { 4 | public int reverse(int x) { 5 | int res = 0; 6 | while (x != 0) { 7 | if (res < Integer.MIN_VALUE / 10 || res > Integer.MAX_VALUE / 10) return 0; 8 | res = res * 10 + (x % 10); 9 | x /= 10; 10 | } 11 | return res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/ReverseInteger/ReverseInteger.py: -------------------------------------------------------------------------------- 1 | def reverse(x: int) -> int: 2 | res, max_int, min_int = 0, 2 ** 31 - 1, -2 ** 31 3 | while x != 0: 4 | if res < min_int // 10 + 1 or res > max_int // 10: 5 | return 0 6 | digit = x % 10 7 | if x < 0 and digit > 0: 8 | digit -= 10 9 | res = res * 10 + digit 10 | x = (x - digit) // 10 11 | 12 | return res 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/ReverseLinkedList/ReverseLinkedList.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, val=0, next=None): 3 | self.val = val 4 | self.next = next 5 | 6 | def reverseList(head: ListNode) -> ListNode: 7 | cur, prev = head, None 8 | while cur is not None: 9 | temp = cur.next 10 | cur.next = prev 11 | prev = cur 12 | cur = temp 13 | 14 | return prev 15 | 16 | 17 | -------------------------------------------------------------------------------- /core/RichestCustomerWealth/RichestCustomerWealth.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class RichestCustomerWealth { 4 | public int maximumWealth(int[][] accounts) { 5 | int res = 0; 6 | for (int[] custom : accounts) { 7 | int temp = 0; 8 | for (int mon : custom) temp += mon; 9 | res = Math.max(res, temp); 10 | } 11 | return res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/RichestCustomerWealth/RichestCustomerWealth.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def maximumWealth(accounts: List[List[int]]) -> int: 4 | res = 0 5 | for custom in accounts: 6 | res = max(res, sum(custom)) 7 | return res 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/RotateArray/RotateArray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def rotate(nums: List[int], k: int) -> None: 5 | nums.reverse() 6 | k = (k - 1) % len(nums) 7 | left, right = 0, k 8 | while left < right: 9 | nums[left], nums[right] = nums[right], nums[left] 10 | left += 1 11 | right -= 1 12 | left, right = k + 1, len(nums) - 1 13 | while left < right: 14 | nums[left], nums[right] = nums[right], nums[left] 15 | left += 1 16 | right -= 1 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core/RotateImage/RotateImage.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from copy import deepcopy 3 | 4 | 5 | def rotate(matrix: List[List[int]]) -> None: 6 | remain = deepcopy(matrix) 7 | n = len(matrix) 8 | for row in range(n): 9 | for col in range(n): 10 | matrix[col][n - 1 - row] = remain[row][col] 11 | -------------------------------------------------------------------------------- /core/RotateString/RotateString.py: -------------------------------------------------------------------------------- 1 | def rotateString(s: str, goal: str) -> bool: 2 | if len(s) != len(goal): 3 | return False 4 | length = len(s) 5 | for index in range(length): 6 | left, right = index, 0 7 | while right < length: 8 | if s[left] != goal[right]: 9 | break 10 | left = (left + 1) % length 11 | right += 1 12 | 13 | if right == length: 14 | return True 15 | 16 | return False 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/SearchA2dMatrix/SearchA2dMatrix.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class SearchA2dMatrix { 4 | public boolean searchMatrix(int[][] matrix, int target) { 5 | int row = 0, col = matrix[0].length - 1; 6 | while (row < matrix.length && col >= 0) { 7 | if (matrix[row][col] == target) return true; 8 | else if (matrix[row][col] < target) row++; 9 | else col--; 10 | } 11 | return false; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/SearchA2dMatrix/SearchA2dMatrix.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def searchMatrix(matrix: List[List[int]], target: int) -> bool: 5 | rows, cols = len(matrix), len(matrix[0]) 6 | row, col = 0, cols - 1 7 | while row < rows and col >= 0: 8 | if matrix[row][col] == target: 9 | return True 10 | elif matrix[row][col] < target: 11 | row += 1 12 | else: 13 | col -= 1 14 | 15 | return False 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /core/SearchA2dMatrixII/SearchA2dMatrixII.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class SearchA2dMatrixII { 4 | public boolean searchMatrix(int[][] matrix, int target) { 5 | int row = 0, col = matrix[0].length - 1; 6 | while (row < matrix.length && col >= 0) { 7 | if (matrix[row][col] == target) return true; 8 | else if (matrix[row][col] < target) row++; 9 | else col--; 10 | } 11 | return false; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/SearchA2dMatrixII/SearchA2dMatrixII.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def searchMatrix(matrix: List[List[int]], target: int) -> bool: 5 | rows, cols = len(matrix), len(matrix[0]) 6 | row, col = 0, cols - 1 7 | while row < rows and col >= 0: 8 | if matrix[row][col] == target: 9 | return True 10 | elif matrix[row][col] < target: 11 | row += 1 12 | else: 13 | col -= 1 14 | 15 | return False 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/SimpleBankSystem/SimpleBankSystem.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/SimpleBankSystem/SimpleBankSystem.java -------------------------------------------------------------------------------- /core/SingleNumber/SingleNumber.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class SingleNumber { 4 | public int singleNumber(int[] nums) { 5 | int res = 0; 6 | for (int num : nums) res ^= num; 7 | return res; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/SingleNumber/SingleNumber.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def singleNumber(nums: List[int]) -> int: 5 | res = 0 6 | for num in nums: 7 | res ^= num 8 | return res 9 | 10 | 11 | -------------------------------------------------------------------------------- /core/SmallestRangeI/SmallestRangeI.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | 4 | public class SmallestRangeI { 5 | public int smallestRangeI(int[] nums, int k) { 6 | int max = nums[0], min = nums[0]; 7 | for (int i = 1; i < nums.length; i++) { 8 | max = Math.max(max, nums[i]); 9 | min = Math.min(min, nums[i]); 10 | } 11 | return Math.max(0, max - min - 2 * k); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/SmallestRangeI/SmallestRangeI.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def smallestRangeI(nums: List[int], k: int) -> int: 5 | return max(0, max(nums) - min(nums) - 2 * k) 6 | -------------------------------------------------------------------------------- /core/SubarraySumEqualsK/SubarraySumEqualsK.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def subarraySum(nums: List[int], k: int) -> int: 5 | remain, total, res = {0: 1}, 0, 0 6 | for num in nums: 7 | total += num 8 | res += remain.get(total - k, 0) 9 | remain[total] = remain.get(total, 0) + 1 10 | 11 | return res 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /core/Subsets/Subsets.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | from copy import deepcopy 3 | 4 | 5 | def subsets(nums: List[int]) -> List[List[int]]: 6 | res, length = [[]], len(nums) 7 | 8 | def dfs(remain, start): 9 | for index in range(start, length): 10 | remain.append(nums[index]) 11 | res.append(deepcopy(remain)) 12 | dfs(remain, index + 1) 13 | remain.pop() 14 | 15 | dfs([], 0) 16 | return res 17 | -------------------------------------------------------------------------------- /core/TheNumberOfGoodSubsets/TheNumberOfGoodSubsets.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | # def numberOfGoodSubsets(nums: List[int]) -> int: 4 | 5 | i = 2 6 | x = 100 7 | while i ** 2 <= x: 8 | if x % i == 0: 9 | print(x // i) 10 | break 11 | 12 | x += 1 13 | -------------------------------------------------------------------------------- /core/TwoSum/TwoSum.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def twoSum(nums: List[int], target: int) -> List[int]: 5 | remain = {} 6 | for index, num in enumerate(nums): 7 | if remain.get(target - num, None) is not None: 8 | return [index, remain[target - num]] 9 | 10 | remain[num] = index 11 | -------------------------------------------------------------------------------- /core/UniquePaths/UniquePaths.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | import java.util.Arrays; 4 | 5 | public class UniquePaths { 6 | public int uniquePaths(int m, int n) { 7 | long res = 1; 8 | for (int x = n, y = 1; y < m; x++, y++) { 9 | res = res * x / y; 10 | } 11 | return (int) res; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/UniquePaths/UniquePaths.py: -------------------------------------------------------------------------------- 1 | def uniquePaths(m: int, n: int) -> int: 2 | dp = [0] + [1] * n 3 | for row in range(1, m): 4 | for col in range(1, n + 1): 5 | if row == 1 and col == 1: 6 | continue 7 | dp[col] = dp[col - 1] + dp[col] 8 | 9 | return dp[-1] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/ValidBoomerang/ValidBoomerang.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class ValidBoomerang { 4 | public boolean isBoomerang(int[][] points) { 5 | return (points[1][0] - points[0][0]) * (points[2][1] - points[1][1]) != (points[1][1] - points[0][1]) * (points[2][0] - points[1][0]); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /core/ValidBoomerang/ValidBoomerang.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def isBoomerang(points: List[List[int]]) -> bool: 5 | return (points[1][0] - points[0][0]) * (points[2][1] - points[1][1]) != (points[1][1] - points[0][1]) * (points[2][0] - points[1][0]) 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /core/ValidParentheses/ValidParentheses.py: -------------------------------------------------------------------------------- 1 | def isValid(s: str) -> bool: 2 | stack = [] 3 | for ch in s: 4 | if stack and ((ch == ")" and stack[-1] == "(") or (ch == "}" and stack[-1] == "{") or (ch == "]" and stack[-1] == "[")): 5 | stack.pop() 6 | else: 7 | stack.append(ch) 8 | 9 | return len(stack) == 0 10 | 11 | 12 | if __name__ == '__main__': 13 | print(isValid("]")) 14 | -------------------------------------------------------------------------------- /core/ValidateIpAddress/ValidateIpAddress.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/ValidateIpAddress/ValidateIpAddress.java -------------------------------------------------------------------------------- /core/WiggleSortII/WiggleSortII.py: -------------------------------------------------------------------------------- 1 | import math 2 | from typing import List 3 | 4 | 5 | def wiggleSort(nums: List[int]) -> None: 6 | n = len(nums) 7 | arr = sorted(nums) 8 | x = (n + 1) // 2 9 | j, k = x - 1, n - 1 10 | for i in range(0, n, 2): 11 | nums[i] = arr[j] 12 | if i + 1 < n: 13 | nums[i + 1] = arr[k] 14 | j -= 1 15 | k -= 1 16 | 17 | 18 | if __name__ == '__main__': 19 | print(wiggleSort([1,3,2,2,3,1])) 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /core/WordBreak/WordBreak.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def wordBreak(s: str, wordDict: List[str]) -> bool: 5 | dp = [False] * len(s) 6 | for index, _ in enumerate(s): 7 | for point in range(index, -1, -1): 8 | if s[point:index + 1] in wordDict and (point == 0 or dp[point - 1]): 9 | dp[index] = True 10 | break 11 | return dp[-1] 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/YuanQuanZhongZuiHouShengXiaDeShuZiLcof/YuanQuanZhongZuiHouShengXiaDeShuZiLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc; 2 | 3 | public class YuanQuanZhongZuiHouShengXiaDeShuZiLcof { 4 | public int lastRemaining(int n, int m) { 5 | int winner = 0; 6 | for (int i = 1; i < n; i++) winner = (winner + m) % (i + 1); 7 | return winner; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/YuanQuanZhongZuiHouShengXiaDeShuZiLcof/YuanQuanZhongZuiHouShengXiaDeShuZiLcof.py: -------------------------------------------------------------------------------- 1 | def lastRemaining(n: int, m: int) -> int: 2 | winner = 0 3 | for i in range(1, n): 4 | winner = (winner + m) % (i + 1) 5 | 6 | return winner 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /core/tmp/Java/Java.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Reclass/TreeNode.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Reclass; 2 | 3 | /** 4 | * @program: AlgorithmProject 5 | * @description: 6 | * @author: DBC 7 | * @create: 2020-02-13 11:30 8 | **/ 9 | public class TreeNode { 10 | public int val; 11 | public TreeNode left; 12 | public TreeNode right; 13 | public TreeNode(int x) { val = x; } 14 | } 15 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution131_140/Solution137.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution131_140; 2 | 3 | /** 4 | * @program: AlgorithmProject 5 | * @description: 6 | * @author: DBC 7 | * @create: 2020-02-27 11:11 8 | **/ 9 | public class Solution137 { 10 | public int singleNumber(int[] nums) { 11 | int result = nums[0]; 12 | for (int i = 1; i < nums.length; i++){ 13 | result ^= nums[i]; 14 | } 15 | return result; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution151_160/Solution157.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution151_160; 2 | 3 | public class Solution157 { 4 | public int findPeakElement(int[] nums){ 5 | int l = 0, r = nums.length - 1; 6 | while (l < r) { 7 | int mid = (l + r) / 2; 8 | if (nums[mid] > nums[mid + 1]) 9 | r = mid; 10 | else 11 | l = mid + 1; 12 | } 13 | return l; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution161_170/Solution163.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution161_170; 2 | 3 | public class Solution163 { 4 | public int majorityElement(int[] nums){ 5 | int count = 0; 6 | Integer candidate = null; 7 | for (int num : nums){ 8 | if (count == 0){ 9 | candidate = num; 10 | } 11 | count += (num == candidate) ? 1 : -1; 12 | } 13 | return candidate; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution161_170/Solution164.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution161_170; 2 | 3 | public class Solution164 { 4 | public int titleToNumber(String s) { 5 | int ans = 0; 6 | for(int i=0;i 0){ 7 | count += n / 5; 8 | n = n / 5; 9 | } 10 | return count; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution161_170/Solution168.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution161_170; 2 | 3 | public class Solution168 { 4 | // select FirstName, LastName, City, State 5 | //from Person left join Address 6 | //on Person.PersonId = Address.PersonId 7 | } 8 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution171_180/Solution171.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution171_180; 2 | 3 | public class Solution171 { 4 | // SELECT Score, CASE 5 | // WHEN @pre = Score THEN @rk + 0 6 | // WHEN @pre := Score THEN @rk := @rk + 1 7 | // ELSE @rk := @rk + 1 8 | // END AS Rank 9 | // FROM Scores, (SELECT @pre := NULL, @rk := 0) AS init 10 | // ORDER BY Score DESC; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution171_180/Solution172.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution171_180; 2 | 3 | public class Solution172 { 4 | // SELECT DISTINCT 5 | // l1.Num AS ConsecutiveNums 6 | // FROM 7 | // Logs l1, 8 | // Logs l2, 9 | // Logs l3 10 | // WHERE 11 | // l1.Id = l2.Id - 1 12 | // AND l2.Id = l3.Id - 1 13 | // AND l1.Num = l2.Num 14 | // AND l2.Num = l3.Num 15 | // ; 16 | } 17 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution171_180/Solution173.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution171_180; 2 | 3 | public class Solution173 { 4 | // SELECT 5 | // a.NAME AS Employee 6 | // FROM Employee AS a JOIN Employee AS b 7 | // ON a.ManagerId = b.Id 8 | // AND a.Salary > b.Salary 9 | // ; 10 | } 11 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution171_180/Solution174.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution171_180; 2 | 3 | public class Solution174 { 4 | // select Email 5 | // from Person 6 | // group by Email 7 | // having count(Email) > 1; 8 | } 9 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution171_180/Solution175.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution171_180; 2 | 3 | public class Solution175 { 4 | // # Write your MySQL query statement below 5 | // select customers.name as 'Customers' 6 | // from customers 7 | // where customers.id not in 8 | // ( 9 | // select customerid from orders 10 | // ); 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution181_190/Solution181.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution181_190; 2 | 3 | public class Solution181 { 4 | public int reverseBits(int n){ 5 | int res = 0; 6 | int count = 0; 7 | while (count < 32){ 8 | res <<= 1; 9 | res |= (n & 1); 10 | n >>= 1; 11 | count++; 12 | } 13 | return res; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution181_190/Solution183.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution181_190; 2 | 3 | public class Solution183 { 4 | // cat words.txt | xargs -n 1 | sort | uniq -c | sort -nr | awk '{print $2" "$1}' 5 | } 6 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution181_190/Solution184.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution181_190; 2 | 3 | public class Solution184 { 4 | // grep -P '^([0-9]{3}-|\([0-9]{3}\) )[0-9]{3}-[0-9]{4}$' file.txt 5 | } 6 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution181_190/Solution185.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution181_190; 2 | 3 | public class Solution185 { 4 | // awk '{ 5 | // for (i=1;i<=NF;i++){ 6 | // if (NR==1){ 7 | // res[i]=$i 8 | // } 9 | // else{ 10 | // res[i]=res[i]" "$i 11 | // } 12 | // } 13 | //}END{ 14 | // for(j=1;j<=NF;j++){ 15 | // print res[j] 16 | // } 17 | // }' file.txt 18 | } 19 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution201_210/Solution208.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution201_210; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | public class Solution208 { 7 | public boolean containsDuplicate(int[] nums) { 8 | Set set = new HashSet<>(nums.length); 9 | for (int x: nums) { 10 | if (set.contains(x)) return true; 11 | set.add(x); 12 | } 13 | return false; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution211_220/Solution213.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution211_220; 2 | 3 | import com.dbc.leecode.Algorithm.Reclass.TreeNode; 4 | 5 | public class Solution213 { 6 | public int countNodes(TreeNode root) { 7 | if (root == null) return 0; 8 | return countNodes(root.left) + countNodes(root.right) + 1; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution21_30/Solution28.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution21_30; 2 | 3 | public class Solution28 { 4 | public static int removeElement(int[] nums, int val) { 5 | if(nums.length == 0) return 0; 6 | int count = 0; 7 | for (int i = 0; i < nums.length; i++) { 8 | if(nums[i] != val) { 9 | nums[count] = nums[i]; 10 | count++; 11 | } 12 | } 13 | return count; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution221_230/Solution224.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution221_230; 2 | 3 | public class Solution224 { 4 | public int countDigitOne(int n) { 5 | int count = 0; 6 | for (long k = 1; k <= n; k *= 10) { 7 | long r = n /k, m = n % k; 8 | count += (r + 8) / 10 * k + (r % 10 == 1 ? m + 1 : 0); 9 | } 10 | return count; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution221_230/Solution228.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution221_230; 2 | 3 | import com.dbc.leecode.Algorithm.Reclass.ListNode; 4 | 5 | public class Solution228 { 6 | public void deleteNode(ListNode node) { 7 | if (node.next == null) node = null; 8 | else { 9 | ListNode tmp = node.next; 10 | node.val = node.next.val; 11 | node.next = node.next.next; 12 | tmp.next = null; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Algorithm/Solution51_60/Solution59.java: -------------------------------------------------------------------------------- 1 | package com.dbc.leecode.Algorithm.Solution51_60; 2 | 3 | public class Solution59 { 4 | public int lengthOfLastWord(String s) { 5 | int end = s.length() - 1; 6 | while(end >= 0 && s.charAt(end) == ' ') end--; 7 | if(end < 0) return 0; 8 | int start = end; 9 | while(start >= 0 && s.charAt(start) != ' ') start--; 10 | return end - start; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Array/BinaryPrefixDivisibleBy5.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Array; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class BinaryPrefixDivisibleBy5 { 7 | public static List prefixesDivBy5(int[] A) { 8 | int M = 0; 9 | List result = new ArrayList<>(); 10 | for (int num : A) { 11 | M = ((M << 1) + num) % 5; 12 | result.add(M == 0); 13 | } 14 | 15 | return result; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Array/ToeplitzMatrix.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Array; 2 | 3 | public class ToeplitzMatrix { 4 | public static boolean isToeplitzMatrix(int[][] matrix) { 5 | int row = matrix.length, col = matrix[0].length; 6 | for (int i = 0; i < row - 1; i++) { 7 | for (int j = 0; j < col - 1; j++) { 8 | if (matrix[i][j] != matrix[i + 1][j + 1]) 9 | return false; 10 | } 11 | } 12 | return true; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Array/TransposeMatrix.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Array; 2 | 3 | public class TransposeMatrix { 4 | public static int[][] transpose(int[][] matrix) { 5 | int[][] result = new int[matrix[0].length][matrix.length]; 6 | for (int i = 0; i < matrix[0].length; i++) { 7 | for (int j = 0; j < matrix.length; j++) { 8 | result[i][j] = matrix[j][i]; 9 | } 10 | } 11 | return result; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/BitOperation/CountingBits.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.BitOperation; 2 | 3 | public class CountingBits { 4 | public int[] countBits(int num) { 5 | int[] remain = new int[num + 1]; 6 | for (int i = 1; i < num + 1; i++) { 7 | int temp = i & (i - 1); 8 | remain[i] = 1 + remain[temp]; 9 | } 10 | return remain; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/BitOperation/DecodeXoredArray.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.BitOperation; 2 | 3 | public class DecodeXoredArray { 4 | public static int[] decode(int[] encoded, int first) { 5 | int[] decode = new int[encoded.length + 1]; 6 | decode[0] = first; 7 | for (int i = 1; i < encoded.length + 1; i++) { 8 | decode[i] = decode[i - 1] ^ encoded[i - 1]; 9 | } 10 | 11 | return decode; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/BitOperation/NumberOf1Bits.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.BitOperation; 2 | 3 | public class NumberOf1Bits { 4 | public int hammingWeight(int n) { 5 | int result = 0; 6 | while (n != 0) { 7 | result++; 8 | n = n & (n - 1); 9 | } 10 | return result; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/BitOperation/ReverseBits.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.BitOperation; 2 | 3 | public class ReverseBits { 4 | public int reverseBits(int n) { 5 | int res = 0; 6 | for (int i = 0; i < 32 && n != 0; i++) { 7 | res |= (n & 1) << (31 - i); 8 | n = n >> 1; 9 | } 10 | return res; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/DynamicProgramming/ClimbingStairs.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.DynamicProgramming; 2 | 3 | public class ClimbingStairs { 4 | public int climbStairs(int n) { 5 | if (n == 0 || n == 1) return 1; 6 | if (n == 2) return 2; 7 | int f1 = 1, f2 = 2; 8 | for (int i = 0; i < n - 2; i++) { 9 | int temp = f1 + f2; 10 | f1 = f2; 11 | f2 = temp; 12 | } 13 | return f2; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/DynamicProgramming/MaximumSubarray.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.DynamicProgramming; 2 | 3 | public class MaximumSubarray { 4 | public int maxSubArray(int[] nums) { 5 | int result = nums[0]; 6 | for (int i = 1; i < nums.length; i++) { 7 | if (nums[i] < nums[i] + nums[i - 1]) { 8 | nums[i] = nums[i] + nums[i - 1]; 9 | } 10 | result = Math.max(result, nums[i]); 11 | } 12 | 13 | return result; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/DynamicProgramming/MinCostClimbingStairs.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.DynamicProgramming; 2 | 3 | public class MinCostClimbingStairs { 4 | public static int minCostClimbingStairs(int[] cost) { 5 | int length = cost.length; 6 | for (int i = 2; i < length; i++) { 7 | cost[i] += cost[i - 1] >= cost[i - 2] ? cost[i - 2] : cost[i - 1]; 8 | } 9 | return cost[length - 1] < cost[length - 2] ? cost[length - 1] : cost[length - 2]; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Main.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm; 2 | 3 | import com.dbc.algorithm.Array.*; 4 | import com.dbc.algorithm.Math.*; 5 | import com.dbc.algorithm.Pointer.*; 6 | import com.dbc.algorithm.Sort.*; 7 | import com.dbc.algorithm.UnionFindSets.*; 8 | 9 | import java.util.*; 10 | 11 | public class Main { 12 | public static void main(String args[]) { 13 | // int result = ReverseInteger.reverse(123); 14 | // System.out.println(result); 15 | ReverseInteger.reverse(123); 16 | } 17 | } -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Math/BulbSwitcher.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Math; 2 | 3 | public class BulbSwitcher { 4 | public static int bulbSwitch(int n) { 5 | int result = 0; 6 | for (int i = 1; i < n + 1; i++) { 7 | if (i * i <= n) 8 | result++; 9 | else break; 10 | } 11 | return result; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Math/BulbSwitcherII.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Math; 2 | 3 | public class BulbSwitcherII { 4 | public static int flipLights(int n, int m) { 5 | int flag = Math.min(n, 3); 6 | if (m == 0) return 1; 7 | if (m == 1) return new int[]{2, 3, 4}[flag - 1]; 8 | if (m == 2) return new int[]{2, 4, 7}[flag - 1]; 9 | return new int[]{2, 4, 8}[flag - 1]; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Math/IntegerBreak.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Math; 2 | 3 | public class IntegerBreak { 4 | public int integerBreak(int n) { 5 | if (n <= 3) return n - 1; 6 | int a = n / 3, b = n % 3; 7 | if (b == 0) return (int)Math.pow(3, a); 8 | if (b == 1) return (int)Math.pow(3, a - 1) * 4; 9 | else return (int)Math.pow(3, a) * 2; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Math/PowxN.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Math; 2 | 3 | public class PowxN { 4 | public double myPow(double x, int n) { 5 | long b = n; 6 | if (b < 0) { 7 | x = 1. / x; 8 | b = -b; 9 | } 10 | double res = 1.; 11 | while (b != 0) { 12 | if (b % 2 == 1) res = res * x; 13 | x = x * x; 14 | b = b >> 1; 15 | } 16 | return res; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/Math/UglyNumber.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.Math; 2 | 3 | public class UglyNumber { 4 | public boolean isUgly(int n) { 5 | if (n <= 0) return false; 6 | int[] factor = new int[]{2, 3, 5}; 7 | for (int num : factor) { 8 | while (n % num == 0) { 9 | n /= num; 10 | } 11 | } 12 | return n == 1; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/BuYongJiaJianChengChuZuoJiaFaLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class BuYongJiaJianChengChuZuoJiaFaLcof { 4 | public int add(int a, int b) { 5 | while (b != 0) { 6 | int c = (a & b) << 1; 7 | a ^= b; 8 | b = c; 9 | } 10 | return a; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/ErJinZhiZhong1DeGeShuLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class ErJinZhiZhong1DeGeShuLcof { 4 | public int hammingWeight(int n) { 5 | int count = 0; 6 | while (n != 0) { 7 | count++; 8 | n = n & (n - 1); 9 | } 10 | return count; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/FanZhuanDanCiShunXuLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class FanZhuanDanCiShunXuLcof { 4 | public String reverseWords(String s) { 5 | StringBuffer res = new StringBuffer(); 6 | String[] temp = s.trim().split(" "); 7 | for (int i = temp.length - 1; i >= 0; i--) { 8 | if (temp[i].equals("")) continue; 9 | res.append(temp[i] + " "); 10 | } 11 | return res.toString().trim(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/FeiBoNaQiShuLieLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class FeiBoNaQiShuLieLcof { 4 | public int fib(int n) { 5 | if (n == 0) return 0; 6 | if (n == 1) return 1; 7 | 8 | int f1 = 0, f2 = 1; 9 | for (int i = 0; i < n - 1; i++) { 10 | int temp = (f1 + f2) % 1000000007; 11 | f1 = f2; 12 | f2 = temp; 13 | } 14 | return f2; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/GuPiaoDeZuiDaLiRunLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class GuPiaoDeZuiDaLiRunLcof { 4 | public int maxProfit(int[] prices) { 5 | if (prices.length < 2) return 0; 6 | int sell = 0, buy = -prices[0]; 7 | for (int i = 1; i < prices.length; i++) { 8 | buy = Math.max(buy, -prices[i]); 9 | sell = Math.max(sell, buy + prices[i]); 10 | } 11 | return sell; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/JianShengZiLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class JianShengZiLcof { 4 | public int cuttingRope(int n) { 5 | if (n <= 3) return n - 1; 6 | int a = n / 3, b = n % 3; 7 | if (b == 0) return (int)Math.pow(3, a); 8 | if (b == 1) return (int)Math.pow(3, a - 1) * 4; 9 | else return (int)Math.pow(3, a) * 2; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/QingWaTiaoTaiJieWenTiLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class QingWaTiaoTaiJieWenTiLcof { 4 | public int numWays(int n) { 5 | if (n == 0 || n == 1) return 1; 6 | if (n == 2) return 2; 7 | int f1 = 1, f2 = 2; 8 | for (int i = 0; i < n - 2; i++) { 9 | int temp = (f1 + f2) % 1000000007; 10 | f1 = f2; 11 | f2 = temp; 12 | } 13 | return f2; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/Qiu12nLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class Qiu12nLcof { 4 | private int res = 0; 5 | public int sumNums(int n) { 6 | boolean x = n > 1 && sumNums(n - 1) > 0; 7 | res += n; 8 | return res; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/YuanQuanZhongZuiHouShengXiaDeShuZiLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class YuanQuanZhongZuiHouShengXiaDeShuZiLcof { 4 | public int lastRemaining(int n, int m) { 5 | int x = 0; 6 | for (int i = 2; i < n + 1; i++) { 7 | x = (x + m) % i; 8 | } 9 | return x; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/ReferOffer/ZuoXuanZhuanZiFuChuanLcof.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.ReferOffer; 2 | 3 | public class ZuoXuanZhuanZiFuChuanLcof { 4 | public String reverseLeftWords(String s, int n) { 5 | return s.substring(n) + s.substring(0, n); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /core/tmp/Java/src/com/dbc/algorithm/String/ReverseWordsInAString.java: -------------------------------------------------------------------------------- 1 | package com.dbc.algorithm.String; 2 | 3 | public class ReverseWordsInAString { 4 | public String reverseWords(String s) { 5 | StringBuffer res = new StringBuffer(); 6 | String[] temp = s.trim().split(" "); 7 | for (int i = temp.length - 1; i >= 0; i--) { 8 | if (temp[i].equals("")) continue; 9 | res.append(temp[i] + " "); 10 | } 11 | return res.toString().trim(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/tmp/Python/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/array/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/array/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/array/binary_prefix_divisible_by_5.py: -------------------------------------------------------------------------------- 1 | def prefixesDivBy5(A: list) -> list: 2 | M = 0 3 | result = [] 4 | for num in A: 5 | M = M * 2 + num 6 | if M % 5 == 0: 7 | result.append(True) 8 | else: 9 | result.append(False) 10 | return result 11 | 12 | 13 | if __name__ == "__main__": 14 | print(prefixesDivBy5([1, 1, 1, 0, 1])) 15 | -------------------------------------------------------------------------------- /core/tmp/Python/array/design_parking_system.py: -------------------------------------------------------------------------------- 1 | class ParkingSystem: 2 | def __init__(self, big: int, medium: int, small: int): 3 | self.remain = [big, medium, small] 4 | 5 | def addCar(self, carType: int) -> bool: 6 | if self.remain[carType - 1] > 0: 7 | self.remain[carType - 1] -= 1 8 | return True 9 | else: 10 | return False -------------------------------------------------------------------------------- /core/tmp/Python/array/fair_candy_swap.py: -------------------------------------------------------------------------------- 1 | def fairCandySwap(A: list, B: list) -> list: 2 | sum_a = sum(A) 3 | sum_b = sum(B) 4 | search = set(B) 5 | 6 | result = [] 7 | total = (sum_a + sum_b) // 2 8 | for a in A: 9 | if total - sum_a + a in search: 10 | result = [a, total - sum_a + a] 11 | break 12 | 13 | return result 14 | 15 | 16 | if __name__ == "__main__": 17 | print(fairCandySwap(A = [1,2,5], B = [2,4])) 18 | -------------------------------------------------------------------------------- /core/tmp/Python/array/find_all_duplicates_in_an_array.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def findDuplicates(nums: List[int]) -> List[int]: 4 | n = len(nums) 5 | result = [] 6 | for num in nums: 7 | num = (num - 1) % n 8 | if nums[num] > n: 9 | result.append(num + 1) 10 | nums[num] += n 11 | 12 | return result 13 | 14 | if __name__ == "__main__": 15 | print(findDuplicates([2,2])) -------------------------------------------------------------------------------- /core/tmp/Python/array/find_all_numbers_disappeared_in_an_array.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | 4 | def findDisappearedNumbers(nums: List[int]) -> List[int]: 5 | n = len(nums) 6 | for num in nums: 7 | num = num % n 8 | nums[num - 1] += n 9 | 10 | result = [] 11 | for i in range(n): 12 | if nums[i] <= n: 13 | result.append(i + 1) 14 | 15 | return result 16 | 17 | 18 | if __name__ == "__main__": 19 | print(findDisappearedNumbers([4, 3, 2, 7, 8, 2, 3, 1])) 20 | -------------------------------------------------------------------------------- /core/tmp/Python/array/find_pivot_index.py: -------------------------------------------------------------------------------- 1 | def pivotIndex(nums: list) -> int: 2 | if not nums: 3 | return -1 4 | 5 | total = 0 6 | for num in nums: 7 | total += num 8 | 9 | precent = 0 10 | for i in range(len(nums)): 11 | if precent == total - nums[i] - precent: 12 | return i 13 | precent += nums[i] 14 | 15 | return -1 16 | 17 | if __name__ == "__main__": 18 | print(pivotIndex([1, 2, 3])) -------------------------------------------------------------------------------- /core/tmp/Python/array/longest_continuous_increasing_subsequence.py: -------------------------------------------------------------------------------- 1 | def findLengthOfLCIS(nums: list) -> int: 2 | if not nums: 3 | return 0 4 | 5 | count = 1 6 | result = 0 7 | for i in range(1, len(nums)): 8 | if nums[i] > nums[i - 1]: 9 | count += 1 10 | else: 11 | result = max(result, count) 12 | count = 1 13 | 14 | return max(result, count) 15 | 16 | if __name__ == "__main__": 17 | print(findLengthOfLCIS([])) -------------------------------------------------------------------------------- /core/tmp/Python/array/majority_element.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def majorityElement(nums: List[int]) -> int: 4 | key, value = nums[0], 1 5 | for i in range(1, len(nums)): 6 | if nums[i] == key: 7 | value += 1 8 | elif value == 0: 9 | key, value = nums[i], 1 10 | else: 11 | value -= 1 12 | 13 | return key -------------------------------------------------------------------------------- /core/tmp/Python/array/max_consecutive_ones.py: -------------------------------------------------------------------------------- 1 | def findMaxConsecutiveOnes(nums: list) -> int: 2 | count, result = 0, 0 3 | for num in nums: 4 | if num == 1: 5 | count += 1 6 | else: 7 | result = max(result, count) 8 | count = 0 9 | 10 | return max(result, count) 11 | 12 | if __name__ == "__main__": 13 | print(findMaxConsecutiveOnes([1,1,0,1,1,1])) 14 | -------------------------------------------------------------------------------- /core/tmp/Python/array/max_consecutive_ones_iii.py: -------------------------------------------------------------------------------- 1 | def longestOnes(A: list, K: int) -> int: 2 | left, right, maxn = 0, 0, 0 3 | while right < len(A): 4 | if A[right] == 1: 5 | maxn += 1 6 | if right - left + 1 - maxn > K: 7 | if A[left] == 1: 8 | maxn -= 1 9 | left += 1 10 | right += 1 11 | 12 | return right - left 13 | 14 | if __name__ == "__main__": 15 | print(longestOnes(A = [0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1], K = 3)) -------------------------------------------------------------------------------- /core/tmp/Python/array/maximum_average_subarray_i.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def findMaxAverage(nums: List[int], k: int) -> float: 4 | result = sum(nums[:k]) 5 | remain = sum(nums[:k]) 6 | for i in range(k, len(nums)): 7 | remain = remain + nums[i] - nums[i - k] 8 | result = max(result, remain) 9 | 10 | return result / k 11 | 12 | if __name__ == "__main__": 13 | print(findMaxAverage(nums=[0,4,0,3,2], k = 1)) 14 | -------------------------------------------------------------------------------- /core/tmp/Python/array/maximum_product_subarray.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from typing import List 3 | 4 | def maxProduct(nums: List[int]) -> int: 5 | result, imax, imin = -sys.maxsize, 1, 1 6 | for num in nums: 7 | re1, re2 = imax, imin 8 | imax = max(re1 * num, re2 * num, num) 9 | imin = min(re2 * num, re1 * num, num) 10 | result = max(result, imax) 11 | 12 | return result 13 | 14 | if __name__ == "__main__": 15 | print(maxProduct([-4,-3,-2])) -------------------------------------------------------------------------------- /core/tmp/Python/array/merge_sorted_array.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def merge(nums1: List[int], m: int, nums2: List[int], n: int) -> None: 4 | point = m + n - 1 5 | while m > 0 and n > 0: 6 | if nums1[m - 1] <= nums2[n - 1]: 7 | nums1[point] = nums2[n - 1] 8 | n -= 1 9 | else: 10 | nums1[point] = nums1[m - 1] 11 | m -= 1 12 | point -= 1 13 | -------------------------------------------------------------------------------- /core/tmp/Python/array/number_of_equivalent_domino_pairs.py: -------------------------------------------------------------------------------- 1 | def numEquivDominoPairs(dominoes: list) -> int: 2 | remain = [0] * 100 3 | ret = 0 4 | for x, y in dominoes: 5 | val = (x * 10 + y if x <= y else y * 10 + x) 6 | ret += remain[val] 7 | remain[val] += 1 8 | 9 | return ret 10 | 11 | 12 | if __name__ == "__main__": 13 | print(numEquivDominoPairs(dominoes=[[1,2],[1,2],[1,2],[1,1],[1,2],[2,2]])) 14 | -------------------------------------------------------------------------------- /core/tmp/Python/array/rabbits_in_forest.py: -------------------------------------------------------------------------------- 1 | import collections 2 | from typing import * 3 | 4 | def numRabbits(answers: List[int]) -> int: 5 | count = collections.Counter(answers) 6 | ans = sum((x + y) // (y + 1) * (y + 1) for y, x in count.items()) 7 | return ans -------------------------------------------------------------------------------- /core/tmp/Python/array/search_a_2d_matrix_ii.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def findNumberIn2DArray(matrix: List[List[int]], target: int) -> bool: 4 | if not matrix: 5 | return False 6 | m, n = len(matrix), len(matrix[0]) 7 | row, col = 0, n - 1 8 | while row < m and col >= 0: 9 | if matrix[row][col] == target: 10 | return True 11 | elif matrix[row][col] < target: 12 | row += 1 13 | else: 14 | col -= 1 15 | 16 | return False 17 | 18 | -------------------------------------------------------------------------------- /core/tmp/Python/array/subarray_sum_equals_k.py: -------------------------------------------------------------------------------- 1 | def subarraySum(nums: list, k: int) -> int: 2 | count, pre = 0, 0 3 | mp = {} 4 | mp[0] = 1 5 | for i in range(len(nums)): 6 | pre += nums[i] 7 | count += mp.get(pre - k, 0) 8 | mp[pre] = mp.get(pre, 0) + 1 9 | return count 10 | 11 | if __name__ == "__main__": 12 | print(subarraySum(nums = [1,1,1], k = 2)) -------------------------------------------------------------------------------- /core/tmp/Python/array/transpose_matrix.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def transpose(matrix: List[List[int]]) -> List[List[int]]: 4 | row = len(matrix) 5 | col = len(matrix[0]) 6 | 7 | result = list() 8 | for i in range(col): 9 | temp = list() 10 | for j in range(row): 11 | temp.append(matrix[j][i]) 12 | result.append(temp) 13 | return result 14 | 15 | if __name__ == "__main__": 16 | print(transpose([[1,2,3],[4,5,6],[7,8,9]])) 17 | -------------------------------------------------------------------------------- /core/tmp/Python/array/two_sum.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def twoSum(nums: List[int], target: int) -> List[int]: 4 | remain = dict() 5 | for i, num in enumerate(nums): 6 | temp = target - num 7 | if remain.get(temp, "a") != "a": 8 | return [i, remain.get(temp, "a")] 9 | else: 10 | remain[num] = i 11 | 12 | return [] -------------------------------------------------------------------------------- /core/tmp/Python/bit-operation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/bit-operation/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/bit-operation/counting_bits.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def countBits(num: int) -> List[int]: 4 | remain = [0 for _ in range(num + 1)] 5 | for i in range(1, num + 1): 6 | temp = i & (i - 1) 7 | remain[i] = remain[temp] + 1 8 | 9 | return remain -------------------------------------------------------------------------------- /core/tmp/Python/bit-operation/decode_xored_array.py: -------------------------------------------------------------------------------- 1 | def decode(encoded: list, first: int) -> list: 2 | decode_array = [first] 3 | for i in range(1, len(encoded) + 1): 4 | temp = decode_array[i - 1] ^ encoded[i - 1] 5 | decode_array.append(temp) 6 | 7 | return decode_array 8 | 9 | 10 | if __name__ == "__main__": 11 | print(decode(encoded = [6,2,7,3], first = 4)) 12 | -------------------------------------------------------------------------------- /core/tmp/Python/bit-operation/number_of_1_bits.py: -------------------------------------------------------------------------------- 1 | def hammingWeight(n: int) -> int: 2 | result = 0 3 | while n != 0: 4 | result += 1 5 | n = n & (n - 1) 6 | 7 | return result -------------------------------------------------------------------------------- /core/tmp/Python/bit-operation/reverse_bits.py: -------------------------------------------------------------------------------- 1 | def reverseBits(n: int) -> int: 2 | res = 0 3 | for i in range(32): 4 | if n == 0: break 5 | res |= (n & 1) << (31 - i) 6 | n = n >> 1 7 | 8 | return res 9 | 10 | 11 | if __name__ == "__main__": 12 | print(reverseBits(-3)) -------------------------------------------------------------------------------- /core/tmp/Python/dynamic-programming/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/dynamic-programming/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/dynamic-programming/best_time_to_buy_and_sell_stock_with_transaction_fee.py: -------------------------------------------------------------------------------- 1 | def max_profit_dp(prices: list, fee: int) -> int: 2 | if not prices: 3 | return 0 4 | 5 | length = len(prices) 6 | buy, sell = -prices[0], 0 7 | for i in range(1, length): 8 | temp = buy 9 | buy = max(buy, sell - prices[i]) 10 | sell = max(sell, temp + prices[i] - fee) 11 | 12 | return max(0, sell) 13 | 14 | if __name__ == "__main__": 15 | print(max_profit_dp([1, 3, 2, 8, 4, 9], 2)) -------------------------------------------------------------------------------- /core/tmp/Python/dynamic-programming/climbing_stairs.py: -------------------------------------------------------------------------------- 1 | def climbStairs(n: int) -> int: 2 | if n == 0 or n == 1: 3 | return 1 4 | if n == 2: 5 | return 2 6 | f1, f2 = 1, 2 7 | for i in range(n - 2): 8 | temp = (f1 + f2) % 1000000007 9 | f1 = f2 10 | f2 = temp 11 | 12 | return f2 -------------------------------------------------------------------------------- /core/tmp/Python/dynamic-programming/maximum_subarray.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def maxSubArray(nums: List[int]) -> int: 4 | n = len(nums) 5 | result = nums[0] 6 | for i in range(1, n): 7 | if nums[i] < nums[i] + nums[i - 1]: 8 | nums[i] = nums[i] + nums[i - 1] 9 | result = max(result, nums[i]) 10 | 11 | return result 12 | 13 | if __name__ == "__main__": 14 | print(maxSubArray([-1000])) 15 | -------------------------------------------------------------------------------- /core/tmp/Python/dynamic-programming/range_sum_query_immutable.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | class NumArray: 4 | def __init__(self, nums: List[int]): 5 | self.remain, total = [], 0 6 | for num in nums: 7 | total += num 8 | self.remain.append(total) 9 | 10 | 11 | def sumRange(self, i: int, j: int) -> int: 12 | if i == 0: 13 | return self.remain[j] 14 | else: 15 | return self.remain[j] - self.remain[i - 1] -------------------------------------------------------------------------------- /core/tmp/Python/heap/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/heap/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/linked-list/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/linked-list/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/linked-list/intersection_of_two_linked_lists.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.next = None 5 | 6 | def getIntersectionNode(headA: ListNode, headB: ListNode) -> ListNode: 7 | node1, node2 = headA, headB 8 | while node1 != node2: 9 | node1 = node1.next if node1 else headB 10 | node2 = node2.next if node2 else headA 11 | 12 | return node1 -------------------------------------------------------------------------------- /core/tmp/Python/math/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/math/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/math/bulb_switcher.py: -------------------------------------------------------------------------------- 1 | def bulbSwitch(n: int) -> int: 2 | result = 0 3 | for i in range(1, n + 1): 4 | if i * i <= n: 5 | result += 1 6 | else: 7 | break 8 | return result 9 | 10 | if __name__ == "__main__": 11 | print(bulbSwitch(100000000)) 12 | -------------------------------------------------------------------------------- /core/tmp/Python/math/bulb_switcher_ii.py: -------------------------------------------------------------------------------- 1 | def flipLights(n, m): 2 | n = min(n, 3) 3 | if m == 0: return 1 4 | if m == 1: return [2, 3, 4][n - 1] 5 | if m == 2: return [2, 4, 7][n - 1] 6 | return [2, 4, 8][n - 1] 7 | 8 | if __name__ == "__main__": 9 | print(flipLights(3, 1)) -------------------------------------------------------------------------------- /core/tmp/Python/math/integer_break.py: -------------------------------------------------------------------------------- 1 | def integerBreak(self, n: int) -> int: 2 | if n <= 3: return n - 1 3 | a, b = n // 3, n % 3 4 | if b == 0: return int(math.pow(3, a)) 5 | if b == 1: return int(math.pow(3, a - 1) * 4) 6 | return int(math.pow(3, a) * 2) -------------------------------------------------------------------------------- /core/tmp/Python/math/nth_digit.py: -------------------------------------------------------------------------------- 1 | def findNthDigit(n: int) -> int: 2 | digit, start, count = 1, 1, 9 3 | while n > count: 4 | n -= count 5 | start *= 10 6 | digit += 1 7 | count = 9 * start * digit 8 | num = start + (n - 1) // digit 9 | return int(str(num)[(n - 1) % digit]) 10 | 11 | if __name__ == "__main__": 12 | print(findNthDigit(10000)) 13 | -------------------------------------------------------------------------------- /core/tmp/Python/math/number_of_digit_one.py: -------------------------------------------------------------------------------- 1 | def countDigitOne(n: int) -> int: 2 | k, low, res = 1, 0, 0 3 | while n != 0: 4 | high = n // 10 5 | cur = n % 10 6 | if cur == 0: res += high * k 7 | elif cur == 1: res += high * k + low + 1 8 | else: res += (high + 1) * k 9 | low += cur * k 10 | k = k * 10 11 | n = n // 10 12 | 13 | return res 14 | 15 | if __name__ == "__main__": 16 | print(countDigitOne(100)) -------------------------------------------------------------------------------- /core/tmp/Python/math/palindrome_number.py: -------------------------------------------------------------------------------- 1 | def isPalindrome(x: int) -> bool: 2 | if x < 0: 3 | return False 4 | 5 | remain = str(x) 6 | left, right = 0, len(remain) - 1 7 | while left < right: 8 | if remain[left] != remain[right]: 9 | return False 10 | left += 1 11 | right -= 1 12 | 13 | return True 14 | 15 | if __name__ == "__main__": 16 | print(isPalindrome(x = 121)) -------------------------------------------------------------------------------- /core/tmp/Python/math/powx_n.py: -------------------------------------------------------------------------------- 1 | def myPow(x: float, n: int) -> float: 2 | res = 1 3 | if n < 0: 4 | x, n = 1 / x, -n 5 | while n != 0: 6 | if n % 2 == 1: res = res * x 7 | x = x * x 8 | n = n >> 1 9 | 10 | return res -------------------------------------------------------------------------------- /core/tmp/Python/math/ugly_number.py: -------------------------------------------------------------------------------- 1 | def isUgly(n: int) -> bool: 2 | if n <= 0: 3 | return False 4 | 5 | factors = [2, 3, 5] 6 | for factor in factors: 7 | while n % factor == 0: 8 | n //= factor 9 | 10 | return n == 1 11 | 12 | if __name__ == "__main__": 13 | print(isUgly(0)) -------------------------------------------------------------------------------- /core/tmp/Python/pointer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/pointer/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/pointer/container_with_most_water.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def maxArea(height: List[int]) -> int: 4 | left, right = 0, len(height) - 1 5 | result = 0 6 | while left < right: 7 | result = max(result, min(height[left], height[right]) * (right - left)) 8 | if height[left] <= height[right]: 9 | left += 1 10 | else: 11 | right -= 1 12 | 13 | return result -------------------------------------------------------------------------------- /core/tmp/Python/pointer/remove_duplicates_from_sorted_array.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def removeDuplicates(nums: List[int]) -> int: 4 | length = len(nums) 5 | if length <= 1: return length 6 | slow, fast = 1, 1 7 | while fast < length: 8 | if nums[fast] != nums[slow - 1]: 9 | nums[slow] = nums[fast] 10 | slow += 1 11 | fast += 1 12 | 13 | return slow -------------------------------------------------------------------------------- /core/tmp/Python/pointer/remove_duplicates_from_sorted_array_ii.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def removeDuplicates(nums: List[int]) -> int: 4 | length = len(nums) 5 | if length <= 2: return length 6 | slow, fast = 2, 2 7 | while fast < length: 8 | if nums[fast] != nums[slow - 2]: 9 | nums[slow] = nums[fast] 10 | slow += 1 11 | fast += 1 12 | 13 | return slow -------------------------------------------------------------------------------- /core/tmp/Python/queue/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/queue/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/1nzheng_shu_zhong_1chu_xian_de_ci_shu_lcof.py: -------------------------------------------------------------------------------- 1 | def countDigitOne(n: int) -> int: 2 | k, low, res = 1, 0, 0 3 | while n != 0: 4 | high = n // 10 5 | cur = n % 10 6 | if cur == 0: res += high * k 7 | elif cur == 1: res += high * k + low + 1 8 | else: res += (high + 1) * k 9 | low += cur * k 10 | k = k * 10 11 | n = n // 10 12 | 13 | return res 14 | 15 | if __name__ == "__main__": 16 | print(countDigitOne(100)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/refer-offer/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/ba_shu_zu_pai_cheng_zui_xiao_de_shu_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | import functools 3 | 4 | def minNumber(nums: List[int]) -> str: 5 | def sort_rule(x, y): 6 | a, b = x + y, y + x 7 | if a > b: return 1 8 | elif a < b: return -1 9 | else: return 0 10 | nums = [str(num) for num in nums] 11 | nums = sorted(nums, key=functools.cmp_to_key(sort_rule)) 12 | return "".join(nums) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/bu_yong_jia_jian_cheng_chu_zuo_jia_fa_lcof.py: -------------------------------------------------------------------------------- 1 | def add(a: int, b: int) -> int: 2 | x = 0xffffffff 3 | a, b = a & x, b & x 4 | while b != 0: 5 | a, b = (a ^ b), (a & b) << 1 & x 6 | return a if a <= 0x7fffffff else ~(a ^ x) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/cong_wei_dao_tou_da_yin_lian_biao_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | class ListNode: 4 | def __init__(self, x): 5 | self.val = x 6 | self.next = None 7 | 8 | def reversePrint(head: ListNode) -> List[int]: 9 | stack = list() 10 | result = [] 11 | while head is not None: 12 | stack.append(head.val) 13 | head = head.next 14 | 15 | while len(stack) != 0: 16 | result.append(stack.pop()) 17 | 18 | return result -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/di_yi_ge_zhi_chu_xian_yi_ci_de_zi_fu_lcof.py: -------------------------------------------------------------------------------- 1 | import collections 2 | 3 | def firstUniqChar(s: str) -> str: 4 | length = len(s) 5 | remain = collections.Counter() 6 | for i in range(length): 7 | remain[s[i]] += 1 8 | for i in range(length): 9 | if remain[s[i]] == 1: 10 | return s[i] 11 | 12 | return " " -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/er_jin_zhi_zhong_1de_ge_shu_lcof.py: -------------------------------------------------------------------------------- 1 | def hammingWeight(n: int) -> int: 2 | count = 0 3 | while n != 0: 4 | count += 1 5 | n = n & (n - 1) 6 | 7 | return count -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/fan_zhuan_dan_ci_shun_xu_lcof.py: -------------------------------------------------------------------------------- 1 | def reverseWords(s: str) -> str: 2 | s = s.strip().split()[::-1] 3 | return " ".join(s) 4 | 5 | if __name__ == "__main__": 6 | print(reverseWords("the sky is blue")) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/fei_bo_na_qi_shu_lie_lcof.py: -------------------------------------------------------------------------------- 1 | def fib(n: int) -> int: 2 | if n == 0: 3 | return 0 4 | if n == 1: 5 | return 1 6 | 7 | f1, f2 = 0, 1 8 | for i in range(n - 1): 9 | temp = (f1 + f2) % 1000000007 10 | f1, f2 = f2, temp 11 | 12 | return f2 13 | 14 | if __name__ == "__main__": 15 | print(fib(5)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/gou_jian_cheng_ji_shu_zu_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def constructArr(a: List[int]) -> List[int]: 4 | b, temp = [1] * len(a), 1 5 | for i in range(1, len(a)): 6 | b[i] = b[i - 1] * a[i - 1] 7 | for i in range(len(a) - 2, -1, -1): 8 | temp *= a[i + 1] 9 | b[i] *= temp 10 | return b -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/gu_piao_de_zui_da_li_run_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def maxProfit(prices: List[int]) -> int: 4 | length = len(prices) 5 | if length < 2: 6 | return 0 7 | buy, sell = -prices[0], 0 8 | for i in range(1, length): 9 | buy = max(buy, -prices[i]) 10 | sell = max(sell, buy + prices[i]) 11 | 12 | return sell 13 | 14 | if __name__ == "__main__": 15 | print(maxProfit([7,1,5,3,6,4])) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/he_wei_sde_liang_ge_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def twoSum(nums: List[int], target: int) -> List[int]: 4 | left, right = 0, len(nums) - 1 5 | while left < right: 6 | if nums[left] + nums[right] == target: 7 | return [nums[left], nums[right]] 8 | elif nums[left] + nums[right] < target: 9 | left += 1 10 | else: 11 | right -= 1 12 | 13 | return [] -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/jian_sheng_zi_ii_lcof.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def cuttingRope(n: int) -> int: 4 | if n <= 3: return n - 1 5 | a, b, p = n // 3, n % 3, 1000000007 6 | if b == 0: return 3 ** a % p 7 | if b == 1: return 3 ** (a - 1) * 4 % p 8 | return 3 ** a * 2 % p 9 | 10 | if __name__ == "__main__": 11 | print(cuttingRope(10)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/jian_sheng_zi_lcof.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def cuttingRope(n: int) -> int: 4 | if n <= 3: return n - 1 5 | a, b = n // 3, n % 3 6 | if b == 0: return int(math.pow(3, a)) 7 | if b == 1: return int(math.pow(3, a - 1) * 4) 8 | return int(math.pow(3, a) * 2) 9 | 10 | 11 | if __name__ == "__main__": 12 | print(cuttingRope(10)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/lian_biao_zhong_dao_shu_di_kge_jie_dian_lcof.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.next = None 5 | 6 | def getKthFromEnd(head: ListNode, k: int) -> ListNode: 7 | front, back = head, head 8 | for i in range(k - 1): 9 | if not back: 10 | return head 11 | back = back.next 12 | 13 | while back.next: 14 | front = front.next 15 | back = back.next 16 | 17 | return front -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/lian_xu_zi_shu_zu_de_zui_da_he_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def maxSubArray(nums: List[int]) -> int: 4 | if len(nums) == 0: 5 | return 0 6 | 7 | res = nums[0] 8 | for i in range(1, len(nums)): 9 | if nums[i] + nums[i - 1] > nums[i]: 10 | nums[i] = nums[i] + nums[i - 1] 11 | res = max(nums[i], res) 12 | 13 | return res 14 | 15 | if __name__ == "__main__": 16 | print(maxSubArray([1])) 17 | -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/liang_ge_lian_biao_de_di_yi_ge_gong_gong_jie_dian_lcof.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.next = None 5 | 6 | def getIntersectionNode(headA: ListNode, headB: ListNode) -> ListNode: 7 | node1, node2 = headA, headB 8 | while node1 != node2: 9 | node1 = node1.next if node1 else headB 10 | node2 = node2.next if node2 else headA 11 | 12 | return node1 -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/nge_tou_zi_de_dian_shu_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def dicesProbability(n: int) -> List[float]: 4 | dp = [1 / 6] * 6 5 | for i in range(2, n + 1): 6 | temp = [0] * (5 * i + 1) 7 | for j in range(len(dp)): 8 | for k in range(6): 9 | temp[j + k] += dp[j] / 6 10 | dp = temp 11 | return dp -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/qing_wa_tiao_tai_jie_wen_ti_lcof.py: -------------------------------------------------------------------------------- 1 | def numWays(n: int) -> int: 2 | if n == 0 or n == 1: 3 | return 1 4 | if n == 2: 5 | return 2 6 | f1, f2 = 1, 2 7 | for i in range(n - 2): 8 | temp = (f1 + f2) % 1000000007 9 | f1 = f2 10 | f2 = temp 11 | 12 | return f2 13 | 14 | if __name__ == "__main__": 15 | print(numWays(2)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/qiu_12n_lcof.py: -------------------------------------------------------------------------------- 1 | def sumNums(self, n: int) -> int: 2 | self.res = 0 3 | def dfs(n: int): 4 | n > 0 and dfs(n - 1) 5 | self.res += n 6 | dfs(n) 7 | return self.res -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/que_shi_de_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def missingNumber(nums: List[int]) -> int: 4 | left, right = 0, len(nums) - 1 5 | res = -1 6 | while left <= right: 7 | mid = (left + right) // 2 8 | if nums[mid] != mid: 9 | res = mid 10 | right = mid - 1 11 | else: 12 | left = mid + 1 13 | 14 | return res 15 | 16 | if __name__ == "__main__": 17 | print(missingNumber([0,1,2,3,4,5,6,7,9])) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shan_chu_lian_biao_de_jie_dian_lcof.py: -------------------------------------------------------------------------------- 1 | class ListNode: 2 | def __init__(self, x): 3 | self.val = x 4 | self.next = None 5 | 6 | def deleteNode(head: ListNode, val: int) -> ListNode: 7 | pre = ListNode(0) 8 | pre.next = head 9 | while pre.next: 10 | if pre.next.val == val: 11 | pre.next = pre.next.next 12 | continue 13 | else: 14 | pre = pre.next 15 | return pre.next 16 | -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zhi_de_zheng_shu_ci_fang_lcof.py: -------------------------------------------------------------------------------- 1 | def myPow(x: float, n: int) -> float: 2 | res = 1 3 | if n < 0: 4 | x, n = 1 / x, -n 5 | while n != 0: 6 | if n % 2 == 1: res = res * x 7 | x = x * x 8 | n = n >> 1 9 | 10 | return res 11 | 12 | if __name__ == "__main__": 13 | print(myPow(x = 2.00000, n = -2)) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zi_xu_lie_zhong_mou_yi_wei_de_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | def findNthDigit(n: int) -> int: 2 | digit, start, count = 1, 1, 9 3 | while n > count: 4 | n -= count 5 | start *= 10 6 | digit += 1 7 | count = 9 * start * digit 8 | num = start + (n - 1) // digit 9 | return int(str(num)[(n - 1) % digit]) 10 | 11 | if __name__ == "__main__": 12 | print(findNthDigit(10000)) 13 | -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zu_zhong_chu_xian_ci_shu_chao_guo_yi_ban_de_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def majorityElement(nums: List[int]) -> int: 4 | key, value = nums[0], 1 5 | for i in range(1, len(nums)): 6 | if nums[i] == key: 7 | value += 1 8 | elif value == 0: 9 | key, value = nums[i], 1 10 | else: 11 | value -= 1 12 | 13 | return key -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zu_zhong_shu_zi_chu_xian_de_ci_shu_ii_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def singleNumber(nums: List[int]) -> int: 4 | count = [0] * 32 5 | for num in nums: 6 | for i in range(32): 7 | count[i] += num & 1 8 | num >>= 1 9 | 10 | res = 0 11 | for i in range(31, -1, -1): 12 | res <<= 1 13 | if count[i] % 3 == 1: 14 | res += 1 15 | return res 16 | 17 | if __name__ == "__main__": 18 | print(singleNumber([9,1,7,9,7,9,7])) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zu_zhong_shu_zi_chu_xian_de_ci_shu_lcof.py: -------------------------------------------------------------------------------- 1 | import functools 2 | from typing import * 3 | 4 | class Solution: 5 | def singleNumbers(self, nums: List[int]) -> List[int]: 6 | ret = functools.reduce(lambda x, y: x ^ y, nums) 7 | div = 1 8 | while div & ret == 0: 9 | div <<= 1 10 | a, b = 0, 0 11 | for n in nums: 12 | if n & div: 13 | a ^= n 14 | else: 15 | b ^= n 16 | return [a, b] -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/shu_zu_zhong_zhong_fu_de_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def findRepeatNumber(nums: List[int]) -> int: 4 | remain = dict() 5 | for num in nums: 6 | if remain.get(num, -1) != -1: 7 | return num 8 | remain[num] = 1 9 | 10 | return 0 -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/ti_huan_kong_ge_lcof.py: -------------------------------------------------------------------------------- 1 | def replaceSpace(s: str) -> str: 2 | result = "" 3 | length = len(s) 4 | for i in range(length): 5 | if s[i] != ' ': 6 | result += s[i] 7 | else: 8 | result += "%20" 9 | 10 | return result -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/yuan_quan_zhong_zui_hou_sheng_xia_de_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | def lastRemaining(n: int, m: int) -> int: 2 | x = 0 3 | for i in range(2, n + 1): 4 | x = (x + m) % i 5 | return x -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/zai_pai_xu_shu_zu_zhong_cha_zhao_shu_zi_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def search(nums: List[int], target: int) -> int: 4 | def helper(tar): 5 | i, j = 0, len(nums) - 1 6 | while i <= j: 7 | m = (i + j) // 2 8 | if nums[m] <= tar: i = m + 1 9 | else: j = m - 1 10 | return i 11 | return helper(target) - helper(target - 1) -------------------------------------------------------------------------------- /core/tmp/Python/refer-offer/zuo_xuan_zhuan_zi_fu_chuan_lcof.py: -------------------------------------------------------------------------------- 1 | from typing import Deque 2 | 3 | 4 | def reverseLeftWords(s: str, n: int) -> str: 5 | queue = Deque(s) 6 | for i in range(n): 7 | queue.append(queue.popleft()) 8 | 9 | return "".join(list(queue)) 10 | 11 | if __name__ == "__main__": 12 | print(reverseLeftWords(s = "abcdefg", n = 2)) -------------------------------------------------------------------------------- /core/tmp/Python/route/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/route/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/search/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/search/find_minimum_in_rotated_sorted_array_ii.py: -------------------------------------------------------------------------------- 1 | from typing import * 2 | 3 | def findMin(nums: List[int]) -> int: 4 | low, high = 0, len(nums) - 1 5 | while low < high: 6 | mid = (low + high) // 2 7 | if nums[mid] < nums[high]: 8 | high = mid 9 | elif nums[mid] > nums[high]: 10 | low = mid + 1 11 | elif nums[mid] == nums[high]: 12 | high -= 1 13 | 14 | return nums[low] -------------------------------------------------------------------------------- /core/tmp/Python/sort/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/sort/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/stack/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/stack/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/stack/next_greater_element_ii.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def nextGreaterElements(nums: List[int]) -> List[int]: 4 | n = len(nums) 5 | ret = [-1] * n 6 | stk = list() 7 | 8 | for i in range(n * 2 - 1): 9 | while stk and nums[stk[-1]] < nums[i % n]: 10 | ret[stk.pop()] = nums[i % n] 11 | stk.append(i % n) 12 | 13 | return ret 14 | -------------------------------------------------------------------------------- /core/tmp/Python/stack/remove_all_adjacent_duplicates_in_string.py: -------------------------------------------------------------------------------- 1 | def removeDuplicates(S: str) -> str: 2 | stack = list() 3 | for s in S: 4 | if stack and stack[-1] == s: 5 | stack.pop() 6 | else: 7 | stack.append(s) 8 | return "".join(stack) 9 | -------------------------------------------------------------------------------- /core/tmp/Python/string/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/string/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/string/integer_to_roman.py: -------------------------------------------------------------------------------- 1 | def intToRoman(num: int) -> str: 2 | remain = {1000:"M", 900:"CM",500:"D",400:"CD",100:"C",90:"XC",50:"L",40:"XL",10:"X",9:"IX",5:"V",4:"IV",3:"III",2:"II",1:"I"} 3 | result = "" 4 | for key, value in remain.items(): 5 | temp = num // key 6 | for _ in range(temp): 7 | result += value 8 | num %= key 9 | if num == 0: 10 | break 11 | 12 | return result 13 | if __name__ == "__main__": 14 | print(intToRoman(3999)) -------------------------------------------------------------------------------- /core/tmp/Python/string/largest_number.py: -------------------------------------------------------------------------------- 1 | import functools 2 | from typing import List 3 | 4 | def largestNumber(nums: List[int]) -> str: 5 | def sort_relu(a, b): 6 | x, y = a + b, b + a 7 | if x > y: return 1 8 | elif x < y: return -1 9 | else: return 0 10 | 11 | nums = [str(num) for num in nums] 12 | nums = sorted(nums, key=functools.cmp_to_key(sort_relu)) 13 | return "".join(nums) 14 | -------------------------------------------------------------------------------- /core/tmp/Python/string/longest_common_prefix.py: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | def longestCommonPrefix(strs: List[str]) -> str: 4 | if not strs: 5 | return "" 6 | 7 | length, count = len(strs[0]), len(strs) 8 | for i in range(length): 9 | c = strs[0][i] 10 | if any(i == len(strs[j]) or strs[j][i] != c for j in range(1, count)): 11 | return strs[0][:i] 12 | 13 | return strs[0] -------------------------------------------------------------------------------- /core/tmp/Python/string/reverse_words_in_a_string.py: -------------------------------------------------------------------------------- 1 | def reverseWords(s: str) -> str: 2 | s = s.strip().split()[::-1] 3 | return " ".join(s) 4 | 5 | if __name__ == "__main__": 6 | print(reverseWords("the sky is blue")) -------------------------------------------------------------------------------- /core/tmp/Python/tree/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/tree/__init__.py -------------------------------------------------------------------------------- /core/tmp/Python/union-find-sets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Python/union-find-sets/__init__.py -------------------------------------------------------------------------------- /core/tmp/Subject/AccountsMerge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/AccountsMerge.png -------------------------------------------------------------------------------- /core/tmp/Subject/AddToArrayFormOfInteger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/AddToArrayFormOfInteger.png -------------------------------------------------------------------------------- /core/tmp/Subject/AddTwoNumbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/AddTwoNumbers.png -------------------------------------------------------------------------------- /core/tmp/Subject/ArrayPartitionI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ArrayPartitionI.png -------------------------------------------------------------------------------- /core/tmp/Subject/BalancedBinaryTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BalancedBinaryTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/BasicCalculator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BasicCalculator.png -------------------------------------------------------------------------------- /core/tmp/Subject/BasicCalculatorII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BasicCalculatorII.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStock.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStockII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStockII.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStockIII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStockIII.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStockIV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStockIV.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStockWithCoolDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStockWithCoolDown.png -------------------------------------------------------------------------------- /core/tmp/Subject/BestTimeToBuyAndSellStockWithTransactionFee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BestTimeToBuyAndSellStockWithTransactionFee.png -------------------------------------------------------------------------------- /core/tmp/Subject/BinaryPrefixDivisibleBy5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BinaryPrefixDivisibleBy5.png -------------------------------------------------------------------------------- /core/tmp/Subject/BinarySearchTreeIterator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BinarySearchTreeIterator.png -------------------------------------------------------------------------------- /core/tmp/Subject/BinaryTreeLevelOrderTraversal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BinaryTreeLevelOrderTraversal.png -------------------------------------------------------------------------------- /core/tmp/Subject/BricksFallingWhenHit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BricksFallingWhenHit.png -------------------------------------------------------------------------------- /core/tmp/Subject/BulbSwitcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BulbSwitcher.png -------------------------------------------------------------------------------- /core/tmp/Subject/BulbSwitcherII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/BulbSwitcherII.png -------------------------------------------------------------------------------- /core/tmp/Subject/CanPlaceFlowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CanPlaceFlowers.png -------------------------------------------------------------------------------- /core/tmp/Subject/CarFleet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CarFleet.png -------------------------------------------------------------------------------- /core/tmp/Subject/CheckIfItIsAStraightLine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CheckIfItIsAStraightLine.png -------------------------------------------------------------------------------- /core/tmp/Subject/ChouShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ChouShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ClimbingStairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ClimbingStairs.png -------------------------------------------------------------------------------- /core/tmp/Subject/ClumsyFactorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ClumsyFactorial.png -------------------------------------------------------------------------------- /core/tmp/Subject/ConstructBinaryTreeFromPreorderAndInorderTraversal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ConstructBinaryTreeFromPreorderAndInorderTraversal.png -------------------------------------------------------------------------------- /core/tmp/Subject/ContainerWithMostWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ContainerWithMostWater.png -------------------------------------------------------------------------------- /core/tmp/Subject/ContiguousArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ContiguousArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/ContinuousSubarraySum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ContinuousSubarraySum.png -------------------------------------------------------------------------------- /core/tmp/Subject/CopyListWithRandomPointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CopyListWithRandomPointer.png -------------------------------------------------------------------------------- /core/tmp/Subject/CountingBits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CountingBits.png -------------------------------------------------------------------------------- /core/tmp/Subject/CouplesHoldingHands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CouplesHoldingHands.png -------------------------------------------------------------------------------- /core/tmp/Subject/CreateMaximumNumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/CreateMaximumNumber.png -------------------------------------------------------------------------------- /core/tmp/Subject/DecodeXoredArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DecodeXoredArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/DegreeOfAnArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DegreeOfAnArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/DesignHashMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DesignHashMap.png -------------------------------------------------------------------------------- /core/tmp/Subject/DesignHashset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DesignHashset.png -------------------------------------------------------------------------------- /core/tmp/Subject/DesignParkingSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DesignParkingSystem.png -------------------------------------------------------------------------------- /core/tmp/Subject/DistinctSubsequences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/DistinctSubsequences.png -------------------------------------------------------------------------------- /core/tmp/Subject/EvaluateReversePolishNotation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/EvaluateReversePolishNotation.png -------------------------------------------------------------------------------- /core/tmp/Subject/FairCandySwap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FairCandySwap.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindAllAnagramsInAString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindAllAnagramsInAString.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindAllDuplicatesInAnArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindAllDuplicatesInAnArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindAllNumbersDisappearedInAnArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindAllNumbersDisappearedInAnArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindCriticalAndPseudoCriticalEdgesInMinimumSpanningTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindCriticalAndPseudoCriticalEdgesInMinimumSpanningTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindDuplicateSubtrees.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindDuplicateSubtrees.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindFirstAndLastPositionOfElementInSortedArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindFirstAndLastPositionOfElementInSortedArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindMedianFromDataStream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindMedianFromDataStream.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindMinimumInRotatedSortedArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindMinimumInRotatedSortedArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindMinimumInRotatedSortedArrayII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindMinimumInRotatedSortedArrayII.png -------------------------------------------------------------------------------- /core/tmp/Subject/FindPivotIndex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FindPivotIndex.png -------------------------------------------------------------------------------- /core/tmp/Subject/FirstMissingPositive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FirstMissingPositive.png -------------------------------------------------------------------------------- /core/tmp/Subject/FlattenNestedListIterator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FlattenNestedListIterator.png -------------------------------------------------------------------------------- /core/tmp/Subject/FlippingAnImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/FlippingAnImage.png -------------------------------------------------------------------------------- /core/tmp/Subject/GetEqualSubstringsWithinBudget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/GetEqualSubstringsWithinBudget.png -------------------------------------------------------------------------------- /core/tmp/Subject/GrumpyBookstoreOwner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/GrumpyBookstoreOwner.png -------------------------------------------------------------------------------- /core/tmp/Subject/HeBingLiangGePaiXuDeLianBiaoLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/HeBingLiangGePaiXuDeLianBiaoLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/IntegerBreak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/IntegerBreak.png -------------------------------------------------------------------------------- /core/tmp/Subject/IntegerToRoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/IntegerToRoman.png -------------------------------------------------------------------------------- /core/tmp/Subject/InvertBinaryTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/InvertBinaryTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/KthLargestElementInAStream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/KthLargestElementInAStream.png -------------------------------------------------------------------------------- /core/tmp/Subject/KthLargestElementInAnArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/KthLargestElementInAnArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/LargestNumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LargestNumber.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestCommonPrefix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestCommonPrefix.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestCommonSubsequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestCommonSubsequence.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestContinuousIncreasingSubsequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestContinuousIncreasingSubsequence.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestContinuousSubarrayWithAbsoluteDiffLessThanOrEqualToLimit.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestIncreasingSubsequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestIncreasingSubsequence.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestPalindromicSubstring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestPalindromicSubstring.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestRepeatingCharacterReplacement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestRepeatingCharacterReplacement.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestSubstringWithAtLeastKRepeatingCharacters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestSubstringWithAtLeastKRepeatingCharacters.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestSubstringWithoutRepeatingCharacters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestSubstringWithoutRepeatingCharacters.png -------------------------------------------------------------------------------- /core/tmp/Subject/LongestTurbulentSubarray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LongestTurbulentSubarray.png -------------------------------------------------------------------------------- /core/tmp/Subject/LowestCommonAncestorOfABinarySearchTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LowestCommonAncestorOfABinarySearchTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/LowestCommonAncestorOfABinaryTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/LowestCommonAncestorOfABinaryTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/MajorityElement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MajorityElement.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaxConsecutiveOnes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaxConsecutiveOnes.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaxConsecutiveOnesIII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaxConsecutiveOnesIII.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumAverageSubarrayI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumAverageSubarrayI.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumDepthOfBinaryTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumDepthOfBinaryTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumNumberOfBallsInABox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumNumberOfBallsInABox.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumPointsYouCanObtainFromCards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumPointsYouCanObtainFromCards.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumProductOfThreeNumbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumProductOfThreeNumbers.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumProductSubarray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumProductSubarray.png -------------------------------------------------------------------------------- /core/tmp/Subject/MaximumSubarray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MaximumSubarray.png -------------------------------------------------------------------------------- /core/tmp/Subject/MedianOfTwoSortedArrays.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MedianOfTwoSortedArrays.png -------------------------------------------------------------------------------- /core/tmp/Subject/MergeSortedArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MergeSortedArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/MinCostClimbingStairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MinCostClimbingStairs.png -------------------------------------------------------------------------------- /core/tmp/Subject/MinCostToConnectAllPoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MinCostToConnectAllPoints.png -------------------------------------------------------------------------------- /core/tmp/Subject/MinimumNumberOfKConsecutiveBitFlips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MinimumNumberOfKConsecutiveBitFlips.png -------------------------------------------------------------------------------- /core/tmp/Subject/MinimumWindowSubstring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MinimumWindowSubstring.png -------------------------------------------------------------------------------- /core/tmp/Subject/MostStonesRemovedWithSameRowOrColumn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/MostStonesRemovedWithSameRowOrColumn.png -------------------------------------------------------------------------------- /core/tmp/Subject/N1ZhengShuZhong1ChuXianDeCiShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/N1ZhengShuZhong1ChuXianDeCiShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/NextGreaterElementII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NextGreaterElementII.png -------------------------------------------------------------------------------- /core/tmp/Subject/NonDecreasingArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NonDecreasingArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/NthDigit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NthDigit.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOf1Bits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOf1Bits.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOfEquivalentDominoPairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOfEquivalentDominoPairs.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOfLongestIncreasingSubsequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOfLongestIncreasingSubsequence.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOfOperationsToMakeNetworkConnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOfOperationsToMakeNetworkConnected.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOfProvinces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOfProvinces.png -------------------------------------------------------------------------------- /core/tmp/Subject/NumberOfValidWordsForEachPuzzle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/NumberOfValidWordsForEachPuzzle.png -------------------------------------------------------------------------------- /core/tmp/Subject/PalindromeNumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PalindromeNumber.png -------------------------------------------------------------------------------- /core/tmp/Subject/PalindromePartitioning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PalindromePartitioning.png -------------------------------------------------------------------------------- /core/tmp/Subject/PalindromePartitioningII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PalindromePartitioningII.png -------------------------------------------------------------------------------- /core/tmp/Subject/PascalsTriangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PascalsTriangle.png -------------------------------------------------------------------------------- /core/tmp/Subject/PascalsTriangleII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PascalsTriangleII.png -------------------------------------------------------------------------------- /core/tmp/Subject/PathWithMinimumEffort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PathWithMinimumEffort.png -------------------------------------------------------------------------------- /core/tmp/Subject/Pattern132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/Pattern132.png -------------------------------------------------------------------------------- /core/tmp/Subject/PermutationInString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PermutationInString.png -------------------------------------------------------------------------------- /core/tmp/Subject/PowxN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/PowxN.png -------------------------------------------------------------------------------- /core/tmp/Subject/RabbitsInForest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RabbitsInForest.png -------------------------------------------------------------------------------- /core/tmp/Subject/RangeSumQuery2dImmutable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RangeSumQuery2dImmutable.png -------------------------------------------------------------------------------- /core/tmp/Subject/RangeSumQueryImmutable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RangeSumQueryImmutable.png -------------------------------------------------------------------------------- /core/tmp/Subject/RedundantConnection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RedundantConnection.png -------------------------------------------------------------------------------- /core/tmp/Subject/RedundantConnectionII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RedundantConnectionII.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BaShuZiFanYiChengZiFuChuanLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BaShuZiFanYiChengZiFuChuanLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BaShuZuPaiChengZuiXiaoDeShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BaShuZuPaiChengZuiXiaoDeShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BaZiFuChuanZhuanHuanChengZhengShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BaZiFuChuanZhuanHuanChengZhengShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BiaoShiShuZhiDeZiFuChuanLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BiaoShiShuZhiDeZiFuChuanLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BuKePaiZhongDeShunZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BuKePaiZhongDeShunZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/BuYongJiaJianChengChuZuoJiaFaLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/BuYongJiaJianChengChuZuoJiaFaLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuIIILcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuIIILcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuIILcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuIILcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/CongShangDaoXiaDaYinErChaShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/CongWeiDaoTouDaYinLianBiaoLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/CongWeiDaoTouDaYinLianBiaoLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/DaYinCong1DaoZuiDaDeNweiShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/DaYinCong1DaoZuiDaDeNweiShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/DiYiGeZhiChuXianYiCiDeZiFuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/DiYiGeZhiChuXianYiCiDeZiFuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/DiaoZhengShuZuShunXuShiQiShuWeiYuOuShuQianMianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/DuiChengDeErChaShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/DuiChengDeErChaShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/DuiLieDeZuiDaZhiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/DuiLieDeZuiDaZhiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaShuDeJingXiangLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaShuDeJingXiangLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaShuDeShenDuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaShuDeShenDuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaShuDeZuiJinGongGongZuXianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaShuDeZuiJinGongGongZuXianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeDiKDaJieDianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeDiKDaJieDianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeHouXuBianLiXuLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeHouXuBianLiXuLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeZuiJinGongGongZuXianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErChaSouSuoShuDeZuiJinGongGongZuXianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErJinZhiZhong1DeGeShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErJinZhiZhong1DeGeShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ErWeiShuZuZhongDeChaZhaoLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ErWeiShuZuZhongDeChaZhaoLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/FanZhuanDanCiShunXuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/FanZhuanDanCiShunXuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/FanZhuanLianBiaoLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/FanZhuanLianBiaoLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/FeiBoNaQiShuLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/FeiBoNaQiShuLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/FuZaLianBiaoDeFuZhiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/FuZaLianBiaoDeFuZhiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/GouJianChengJiShuZuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/GouJianChengJiShuZuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/GuPiaoDeZuiDaLiRunLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/GuPiaoDeZuiDaLiRunLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/HeBingLiangGePaiXuDeLianBiaoLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/HeBingLiangGePaiXuDeLianBiaoLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/HeWeiSdeLianXuZhengShuXuLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/HeWeiSdeLianXuZhengShuXuLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/HeWeiSdeLiangGeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/HeWeiSdeLiangGeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/JiQiRenDeYunDongFanWeiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/JiQiRenDeYunDongFanWeiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/JianShengZiIILcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/JianShengZiIILcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/JianShengZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/JianShengZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/JuZhenZhongDeLuJingLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/JuZhenZhongDeLuJingLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/LiWuDeZuiDaJieZhiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/LiWuDeZuiDaJieZhiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/LianBiaoZhongDaoShuDiKgeJieDianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/LianBiaoZhongDaoShuDiKgeJieDianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/LianXuZiShuZuDeZuiDaHeLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/LianXuZiShuZuDeZuiDaHeLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/LiangGeLianBiaoDeDiYiGeGongGongJieDianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/LiangGeLianBiaoDeDiYiGeGongGongJieDianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/N1ZhengShuZhong1ChuXianDeCiShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/N1ZhengShuZhong1ChuXianDeCiShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/NgeTouZiDeDianShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/NgeTouZiDeDianShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/PingHengErChaShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/PingHengErChaShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/QingWaTiaoTaiJieWenTiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/QingWaTiaoTaiJieWenTiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/Qiu12nLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/Qiu12nLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/QueShiDeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/QueShiDeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShanChuLianBiaoDeJieDianLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShanChuLianBiaoDeJieDianLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuDeZiJieGouLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuDeZiJieGouLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuJuLiuZhongDeZhongWeiShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuJuLiuZhongDeZhongWeiShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZhiDeZhengShuCiFangLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZhiDeZhengShuCiFangLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZiXuLieZhongMouYiWeiDeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZiXuLieZhongMouYiWeiDeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZuZhongChuXianCiShuChaoGuoYiBanDeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZuZhongChuXianCiShuChaoGuoYiBanDeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZuZhongDeNiXuDuiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZuZhongDeNiXuDuiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZuZhongShuZiChuXianDeCiShuIILcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZuZhongShuZiChuXianDeCiShuIILcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZuZhongShuZiChuXianDeCiShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZuZhongShuZiChuXianDeCiShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShuZuZhongZhongFuDeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShuZuZhongZhongFuDeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ShunShiZhenDaYinHJuZhenLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ShunShiZhenDaYinHJuZhenLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/TiHuanKongGeLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/TiHuanKongGeLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/XuanZhuanShuZuDeZuiXiaoShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/XuanZhuanShuZuDeZuiXiaoShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/YongLiangGeZhanShiXianDuiLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/YongLiangGeZhanShiXianDuiLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/YuanQuanZhongZuiHouShengXiaDeShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/YuanQuanZhongZuiHouShengXiaDeShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZaiPaiXuShuZuZhongChaZhaoShuZiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZaiPaiXuShuZuZhongChaZhaoShuZiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZhanDeYaRuDanChuXuLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZhanDeYaRuDanChuXuLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZhengZeBiaoDaShiPiPeiLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZhengZeBiaoDaShiPiPeiLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZhongJianErChaShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZhongJianErChaShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZiFuChuanDePaiLieLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZiFuChuanDePaiLieLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZuiChangBuHanZhongFuZiFuDeZiZiFuChuanLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZuiChangBuHanZhongFuZiFuDeZiZiFuChuanLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZuiXiaoDeKgeShuLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZuiXiaoDeKgeShuLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/ZuoXuanZhuanZiFuChuanLcof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/ZuoXuanZhuanZiFuChuanLcof.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReferOffer/nthUglyNumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReferOffer/nthUglyNumber.png -------------------------------------------------------------------------------- /core/tmp/Subject/RegionsCutBySlashes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RegionsCutBySlashes.png -------------------------------------------------------------------------------- /core/tmp/Subject/RegularExpressionMatching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RegularExpressionMatching.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveAllAdjacentDuplicatesInString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveAllAdjacentDuplicatesInString.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveDuplicatesFromSortedArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveDuplicatesFromSortedArray.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveDuplicatesFromSortedArrayII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveDuplicatesFromSortedArrayII.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveDuplicatesFromSortedList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveDuplicatesFromSortedList.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveDuplicatesFromSortedListII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveDuplicatesFromSortedListII.png -------------------------------------------------------------------------------- /core/tmp/Subject/RemoveMaxNumberOfEdgesToKeepGraphFullyTraversable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RemoveMaxNumberOfEdgesToKeepGraphFullyTraversable.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReshapeTheMatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReshapeTheMatrix.png -------------------------------------------------------------------------------- /core/tmp/Subject/RestoreTheArrayFromAdjacentPairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RestoreTheArrayFromAdjacentPairs.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReverseBits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReverseBits.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReverseInteger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReverseInteger.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReverseLinkedList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReverseLinkedList.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReverseLinkedListII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReverseLinkedListII.png -------------------------------------------------------------------------------- /core/tmp/Subject/ReverseWordsInAString.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ReverseWordsInAString.png -------------------------------------------------------------------------------- /core/tmp/Subject/RomanToInteger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RomanToInteger.png -------------------------------------------------------------------------------- /core/tmp/Subject/RotateList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RotateList.png -------------------------------------------------------------------------------- /core/tmp/Subject/RussianDollEnvelopes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/RussianDollEnvelopes.png -------------------------------------------------------------------------------- /core/tmp/Subject/SearchA2dMatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SearchA2dMatrix.png -------------------------------------------------------------------------------- /core/tmp/Subject/SearchInABinarySearchTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SearchInABinarySearchTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/SearchInRotatedSortedArrayII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SearchInRotatedSortedArrayII.png -------------------------------------------------------------------------------- /core/tmp/Subject/SetMatrixZeroes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SetMatrixZeroes.png -------------------------------------------------------------------------------- /core/tmp/Subject/SimilarStringGroups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SimilarStringGroups.png -------------------------------------------------------------------------------- /core/tmp/Subject/SlidingWindowMaximum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SlidingWindowMaximum.png -------------------------------------------------------------------------------- /core/tmp/Subject/SlidingWindowMedian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SlidingWindowMedian.png -------------------------------------------------------------------------------- /core/tmp/Subject/SpiralMatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SpiralMatrix.png -------------------------------------------------------------------------------- /core/tmp/Subject/SpiralMatrixII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SpiralMatrixII.png -------------------------------------------------------------------------------- /core/tmp/Subject/StringToIntegerAtoi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/StringToIntegerAtoi.png -------------------------------------------------------------------------------- /core/tmp/Subject/SubarraySumEqualsK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SubarraySumEqualsK.png -------------------------------------------------------------------------------- /core/tmp/Subject/SubarraysWithKDifferentIntegers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SubarraysWithKDifferentIntegers.png -------------------------------------------------------------------------------- /core/tmp/Subject/SubsetsII.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SubsetsII.png -------------------------------------------------------------------------------- /core/tmp/Subject/Sum3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/Sum3.png -------------------------------------------------------------------------------- /core/tmp/Subject/Sum4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/Sum4.png -------------------------------------------------------------------------------- /core/tmp/Subject/SwappingNodesInALinkedList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SwappingNodesInALinkedList.png -------------------------------------------------------------------------------- /core/tmp/Subject/SwimInRisingWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SwimInRisingWater.png -------------------------------------------------------------------------------- /core/tmp/Subject/SymmetricTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/SymmetricTree.png -------------------------------------------------------------------------------- /core/tmp/Subject/ToeplitzMatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ToeplitzMatrix.png -------------------------------------------------------------------------------- /core/tmp/Subject/TransposeMatrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/TransposeMatrix.png -------------------------------------------------------------------------------- /core/tmp/Subject/TwoSum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/TwoSum.png -------------------------------------------------------------------------------- /core/tmp/Subject/UglyNumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/UglyNumber.png -------------------------------------------------------------------------------- /core/tmp/Subject/ValidateStackSequences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ValidateStackSequences.png -------------------------------------------------------------------------------- /core/tmp/Subject/VolumeOfHistogramLcci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/VolumeOfHistogramLcci.png -------------------------------------------------------------------------------- /core/tmp/Subject/WordSearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/WordSearch.png -------------------------------------------------------------------------------- /core/tmp/Subject/ZigzagConversion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/ZigzagConversion.png -------------------------------------------------------------------------------- /core/tmp/Subject/findNumberIn2DArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/Subject/findNumberIn2DArray.png -------------------------------------------------------------------------------- /core/tmp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/core/tmp/__init__.py -------------------------------------------------------------------------------- /gunicorn.conf.py: -------------------------------------------------------------------------------- 1 | workers = 5 2 | worker_class = "gevent" # 采用gevent库,支持异步处理请求,提高吞吐量 3 | bind = "0.0.0.0:80" 4 | -------------------------------------------------------------------------------- /requirement.txt: -------------------------------------------------------------------------------- 1 | click==8.0.1 2 | Flask==2.0.1 3 | importlib-metadata==4.6.1 4 | itsdangerous==2.0.1 5 | Jinja2==3.0.1 6 | MarkupSafe==2.0.1 7 | typing-extensions==3.10.0.0 8 | Werkzeug==2.0.1 9 | zipp==3.5.0 -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | # /bin/bash 2 | gunicorn server:app -c gunicorn.conf.py -------------------------------------------------------------------------------- /settings.py: -------------------------------------------------------------------------------- 1 | config_path = "configs.json" 2 | catalog = {"LeetCode": "LeetCode", "NiuKe": "牛客网"} 3 | url = "http://localhost:5000/" 4 | badge_color = {"Hard": "", "Medium": "layui-bg-orange", "Easy": "layui-bg-blue"} 5 | home_page = "README.md" 6 | -------------------------------------------------------------------------------- /static/editormd/lib/codemirror/addon/display/fullscreen.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-fullscreen { 2 | position: fixed; 3 | top: 0; left: 0; right: 0; bottom: 0; 4 | height: auto; 5 | z-index: 9; 6 | } 7 | -------------------------------------------------------------------------------- /static/editormd/lib/codemirror/addon/search/matchesonscrollbar.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-search-match { 2 | background: gold; 3 | border-top: 1px solid orange; 4 | border-bottom: 1px solid orange; 5 | -moz-box-sizing: border-box; 6 | box-sizing: border-box; 7 | opacity: .5; 8 | } 9 | -------------------------------------------------------------------------------- /static/editormd/lib/codemirror/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"5.0.0", 4 | "main": ["lib/codemirror.js", "lib/codemirror.css"], 5 | "ignore": [ 6 | "**/.*", 7 | "node_modules", 8 | "components", 9 | "bin", 10 | "demo", 11 | "doc", 12 | "test", 13 | "index.html", 14 | "package.json" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /static/editormd/lib/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /static/editormd/lib/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/fonts/editormd-logo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/editormd-logo.eot -------------------------------------------------------------------------------- /static/fonts/editormd-logo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/editormd-logo.ttf -------------------------------------------------------------------------------- /static/fonts/editormd-logo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/editormd-logo.woff -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/img/favicon.ico -------------------------------------------------------------------------------- /static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /static/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DengBoCong/Algorithm/27b46e77b3b7cc38ef59721b591e26a3c97eef5b/static/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 404 9 | 10 | --------------------------------------------------------------------------------