Full Code of fluency03/leetcode-java for AI

master 81e5c1ab0ef5 cached
596 files
1.8 MB
509.0k tokens
3448 symbols
1 requests
Download .txt
Showing preview only (1,973K chars total). Download the full file or copy to clipboard to get everything.
Repository: fluency03/leetcode-java
Branch: master
Commit: 81e5c1ab0ef5
Files: 596
Total size: 1.8 MB

Directory structure:
gitextract_ximp81dy/

├── .gitignore
├── README.md
└── src/
    ├── .gitignore
    ├── AccountsMerge721.java
    ├── AddBinary67.java
    ├── AddBoldTagInString616.java
    ├── AddOneRowToTree623.java
    ├── AddStrings415.java
    ├── AddTwoNumbers2.java
    ├── AddTwoNumbersII445.java
    ├── AlienDictionary269.java
    ├── AllNodesDistanceKInBinaryTree863.java
    ├── AllOOneDataStructure432.java
    ├── AllPathsFromSourceToTarget797.java
    ├── AndroidUnlockPatterns351.java
    ├── AsyncJobMonitor.java
    ├── AverageOfLevelsInBinaryTree637.java
    ├── BackspaceStringCompare844.java
    ├── BalancedBinaryTree110.java
    ├── BaseballGame682.java
    ├── BasicCalculator224.java
    ├── BasicCalculatorII227.java
    ├── Bench.java
    ├── BestMeetingPoint296.java
    ├── BestTimeToBuyAndSellStock121.java
    ├── BestTimeToBuyAndSellStockII122.java
    ├── BestTimeToBuyAndSellStockIII123.java
    ├── BestTimeToBuyAndSellStockIV188.java
    ├── BestTimeToBuyAndSellStockWithCooldown309.java
    ├── BestTimeToBuyAndSellStockWithTransactionFee714.java
    ├── BinarySearchTreeIterator173.java
    ├── BinaryTreeInorderTraversal94.java
    ├── BinaryTreeLevelOrderTraversal102.java
    ├── BinaryTreeLevelOrderTraversalII107.java
    ├── BinaryTreeLongestConsecutiveSequence298.java
    ├── BinaryTreeMaximumPathSum124.java
    ├── BinaryTreePaths257.java
    ├── BinaryTreePreorderTraversal144.java
    ├── BinaryTreeRightSideView199.java
    ├── BinaryTreeVerticalOrderTraversal314.java
    ├── BinaryTreeZigzagLevelOrderTraversal103.java
    ├── BinaryTreesWithFactors823.java
    ├── BitwiseANDOfNumbersRange201.java
    ├── BoatsToSavePeople885.java
    ├── BombEnemy361.java
    ├── BoundaryOfBinaryTree545.java
    ├── BrickWall554.java
    ├── BricksFallingWhenHit803.java
    ├── BuddyStrings859.java
    ├── BullsAndCows299.java
    ├── BurstBalloons312.java
    ├── CanIWin464.java
    ├── CheapestFlightsWithinKStops787.java
    ├── ClimbingStairs70.java
    ├── CloneGraph133.java
    ├── ClosestBinarySearchTreeValue270.java
    ├── ClosestBinarySearchTreeValueII272.java
    ├── CoinChange322.java
    ├── CoinChangeII518.java
    ├── CollatzConjecture.java
    ├── CombinationSum39.java
    ├── CombinationSumIII216.java
    ├── CombinationSumIV377.java
    ├── CompareVersionNumbers165.java
    ├── ConcatenatedWords472.java
    ├── ConstructBinaryTreeFromInorderAndPostorderTraversal106.java
    ├── ConstructBinaryTreeFromPreorderAndInorderTraversal105.java
    ├── ConstructBinaryTreeFromString536.java
    ├── ConstructQuadTree427.java
    ├── ContainerWithMostWater11.java
    ├── ContainsDuplicate217.java
    ├── ContainsDuplicateIII220.java
    ├── ContainsDuplicatesII219.java
    ├── ContiguousArray525.java
    ├── ContinuousSubarraySum523.java
    ├── ConvertANumberToHexadecimal405.java
    ├── ConvertBSTToGreaterTree538.java
    ├── ConvertBinarySearchTreeToSortedDoublyLinkedList.java
    ├── ConvertSortedArrayToBinarySearchTree108.java
    ├── ConvertSortedListToBST109.java
    ├── CopyListWithRandomPointer138.java
    ├── CountNumbersWithUniqueDigits357.java
    ├── CountOfRangeSum327.java
    ├── CountOfSmallerNumbersAfterSelf315.java
    ├── CountPrimes204.java
    ├── CountingBits338.java
    ├── CouplesHoldingHands765.java
    ├── CourseSchedule207.java
    ├── CourseScheduleII210.java
    ├── CutOffTreesForGolfEvent675.java
    ├── DailyTemperatures739.java
    ├── DataStreamAsDisjointIntervals352.java
    ├── DecodeString394.java
    ├── DecodeWays91.java
    ├── DecodeWaysII639.java
    ├── DecodedStringAtIndex884.java
    ├── DeleteAndEarn740.java
    ├── DeleteNodeInABST450.java
    ├── DeleteNodeInALinkedList237.java
    ├── DesignCircularDeque641.java
    ├── DesignCircularQueue622.java
    ├── DesignCompressedStringIterator604.java
    ├── DesignHashMap706.java
    ├── DesignHashSet705.java
    ├── DesignHitCounter362.java
    ├── DesignInMemoryFileSystem588.java
    ├── DesignLinkedList707.java
    ├── DesignLogStorageSystem635.java
    ├── DesignSearchAutocompleteSystem642.java
    ├── DesignSnakeGame353.java
    ├── DesignTicTacToe348.java
    ├── DesignTwitter355.java
    ├── DiagonalTraverse498.java
    ├── DiameterOfBinaryTree543.java
    ├── DifferentWaysToAddParentheses241.java
    ├── DivideTwoIntegers29.java
    ├── DominoAndTrominoTiling790.java
    ├── EditDistance72.java
    ├── EmployeeFreeTime759.java
    ├── EncodeAndDecodeStrings271.java
    ├── EncodeAndDecodeTinyURL535.java
    ├── EqualTreePartition663.java
    ├── EvaluateDivision399.java
    ├── EvaluateReversePolishNotation150.java
    ├── ExamRoom855.java
    ├── ExclusiveTimeOfFunctions636.java
    ├── ExpressionAddOperators282.java
    ├── FindAllAnagramsInAString438.java
    ├── FindAllNumbersDisappearedInAnArray448.java
    ├── FindAnagramMappings760.java
    ├── FindAndReplacePattern890.java
    ├── FindBottomLeftTreeValue513.java
    ├── FindCenterOfMassInA2DArray.java
    ├── FindDuplicateSubtrees652.java
    ├── FindEventualSafeStates802.java
    ├── FindKClosestElements658.java
    ├── FindKPairsWithSmallestSums373.java
    ├── FindKthSmallestPairDistance719.java
    ├── FindLargestValueInEachTreeRow515.java
    ├── FindMedianFromDataStream295.java
    ├── FindMinimumInRotatedSortedArray153.java
    ├── FindMinimumInRotatedSortedArrayII154.java
    ├── FindModeInBinarySearchTree501.java
    ├── FindPeakElement162.java
    ├── FindTheCelebrity277.java
    ├── FindTheDuplicateNumber287.java
    ├── FirstBadVersion278.java
    ├── FirstMissingPositive41.java
    ├── FirstUniqueCharacterInAString387.java
    ├── FizzBuzz412.java
    ├── Flatten2DVector251.java
    ├── FlattenBinaryTreeToLinkedList114.java
    ├── FlipGame293.java
    ├── FlippingAnImage832.java
    ├── FourSum18.java
    ├── FourSumII454.java
    ├── FractionToRecurringDecimal166.java
    ├── FriendCircles547.java
    ├── FrogJump403.java
    ├── GameOfLife289.java
    ├── GeneralizedAbbreviation320.java
    ├── GenerateParentheses22.java
    ├── GraphValidTree261.java
    ├── GroupAnagrams49.java
    ├── GroupShiftedStrings249.java
    ├── GuessNumberHigherOrLowerII375.java
    ├── GuessTheWord843.java
    ├── HIndex274.java
    ├── HandOfStraights846.java
    ├── HappyNumber202.java
    ├── HighestPopulationYear.java
    ├── HouseRobber198.java
    ├── HouseRobberII213.java
    ├── HouseRobberIII337.java
    ├── ImageSmoother661.java
    ├── ImplementMagicDictionary676.java
    ├── ImplementQueueUsingStacks232.java
    ├── ImplementStackusingQueues225.java
    ├── ImplementStrStr28.java
    ├── ImplementTriePrefixTree208.java
    ├── IncreasingSubsequences491.java
    ├── IncreasingTripletSubsequence334.java
    ├── InorderSuccessorInBST285.java
    ├── InsertDeleteGetRandomOOne380.java
    ├── InsertInterval57.java
    ├── InsertIntoACyclicSortedList.java
    ├── InsertionSortList147.java
    ├── IntegerBreak343.java
    ├── IntegerToEnglishWords273.java
    ├── IntegerToRoman12.java
    ├── InterleavingString97.java
    ├── IntersectionOfTwoArrays349.java
    ├── IntersectionOfTwoArraysII350.java
    ├── IntersectionOfTwoLinkedLists160.java
    ├── Interval.java
    ├── InvertBinaryTree226.java
    ├── IsGraphBipartite785.java
    ├── IsSubsequence392.java
    ├── IslandPerimeter463.java
    ├── IsomorphicStrings205.java
    ├── JewelsAndStones771.java
    ├── JudgeRouteCircle657.java
    ├── JumpGame55.java
    ├── JumpGameII45.java
    ├── KEmptySlots683.java
    ├── KMP.java
    ├── KeysAndRooms841.java
    ├── KillProcess582.java
    ├── KokoEatingBananas875.java
    ├── KthLargestElementInAnArray215.java
    ├── KthSmallestElementInABST230.java
    ├── KthSmallestElementInASortedMatrix378.java
    ├── KthSmallestPrimeFraction786.java
    ├── KthSymbolInGrammar779.java
    ├── LFUCache460.java
    ├── LRUCache146.java
    ├── LargestBSTSubtree333.java
    ├── LargestDivisibleSubset368.java
    ├── LargestNumber179.java
    ├── LargestRectangleInHistogram84.java
    ├── LemonadeChange860.java
    ├── LengthOfLongestFibonacciSubsequence873.java
    ├── LetterCombinationsOfAPhoneNumber17.java
    ├── LexicographicalNumbers386.java
    ├── LicenseKeyFormatting482.java
    ├── LinkedListCycle141.java
    ├── LinkedListCycleII142.java
    ├── LinkedListRandomNode382.java
    ├── ListNode.java
    ├── LoggerRateLimiter359.java
    ├── LonelyPixelI531.java
    ├── LongestAbsoluteFilePath388.java
    ├── LongestCommonPrefix14.java
    ├── LongestConsecutiveSequence128.java
    ├── LongestContinuousIncreasingSubsequence674.java
    ├── LongestHarmoniousSubsequence594.java
    ├── LongestIncreasingSubsequence300.java
    ├── LongestMountainInArray845.java
    ├── LongestPalindrome409.java
    ├── LongestPalindromicSubsequence516.java
    ├── LongestPalindromicSubstring5.java
    ├── LongestRepeatingCharacterReplacement424.java
    ├── LongestSubstringWithAtMostKDistinctCharacters340.java
    ├── LongestSubstringWithAtMostTwoDistinctCharacters159.java
    ├── LongestSubstringWithoutRepeatingCharacters3.java
    ├── LongestUnivaluePath687.java
    ├── LongestValidParentheses32.java
    ├── LongestWordInDictionary720.java
    ├── LowestCommonAncestorOfABinarySearchTree235.java
    ├── LowestCommonAncestorOfABinaryTree236.java
    ├── MagicalString481.java
    ├── MajorityElement169.java
    ├── MapSumPairs677.java
    ├── MatchsticksToSquare473.java
    ├── MaxAreaOfIsland695.java
    ├── MaxChunksToMakeSorted769.java
    ├── MaxChunksToMakeSortedII768.java
    ├── MaxConsecutiveOnes485.java
    ├── MaxConsecutiveOnesII487.java
    ├── MaxIncreaseToKeepCitySkyline807.java
    ├── MaxPointsOnALine149.java
    ├── MaxStack716.java
    ├── MaxSumOfRectangleNoLargerThanK363.java
    ├── MaximalRectangle85.java
    ├── MaximalSquare221.java
    ├── MaximizeDistanceToClosestPerson849.java
    ├── MaximumAverageSubarrayI643.java
    ├── MaximumBinaryTree654.java
    ├── MaximumDepthOfBinaryTree104.java
    ├── MaximumFrequencyStack895.java
    ├── MaximumLengthOfPairChain646.java
    ├── MaximumLengthOfRepeatedSubarray718.java
    ├── MaximumProductOfThreeNumbers628.java
    ├── MaximumProductOfWordLengths318.java
    ├── MaximumProductSubarray152.java
    ├── MaximumSizeSubarraySumEqualsK325.java
    ├── MaximumSubarray53.java
    ├── MaximumSumOf3NonOverlappingSubarrays689.java
    ├── MaximumVacationDays568.java
    ├── MaximumWidthOfBinaryTree662.java
    ├── MaximumXOROfTwoNumbersInAnArray421.java
    ├── MedianOfTwoSortedArrays4.java
    ├── MeetingRooms252.java
    ├── MeetingRoomsII253.java
    ├── MergeIntervals56.java
    ├── MergeKSortedLists23.java
    ├── MergeSortedArray88.java
    ├── MergeTwoSortedLists21.java
    ├── MiddleOfTheLinkedList876.java
    ├── MinCostClimbingStairs746.java
    ├── MinStack.java
    ├── Minesweeper529.java
    ├── MinimumASCIIDeleteSumForTwoStrings712.java
    ├── MinimumAbsoluteDifferenceInBST530.java
    ├── MinimumDepthOfBinaryTree111.java
    ├── MinimumDistanceBetweenBSTNodes783.java
    ├── MinimumGeneticMutation433.java
    ├── MinimumHeightTrees310.java
    ├── MinimumMovesToEqualArrayElementsII462.java
    ├── MinimumPathSum64.java
    ├── MinimumSizeSubarraySum209.java
    ├── MinimumWindowSubsequence727.java
    ├── MinimumWindowSubstring76.java
    ├── MissingNumber268.java
    ├── MissingRanges163.java
    ├── MonotoneIncreasingDigits738.java
    ├── MonotonicArray896.java
    ├── MostCommonWord819.java
    ├── MostFrequentSubtreeSum508.java
    ├── MostProfitAssigningWork826.java
    ├── MoveZeroes283.java
    ├── MovingAverageFromDataStream346.java
    ├── MultiplyStrings43.java
    ├── MyCalendarI729.java
    ├── MyCalendarII731.java
    ├── NQueens51.java
    ├── NQueensII52.java
    ├── NaryTreeLevelOrderTraversal429.java
    ├── NaryTreePostorderTraversal590.java
    ├── NestedIterator.java
    ├── NestedListWeightSum339.java
    ├── NextClosestTime681.java
    ├── NextGreaterElementI496.java
    ├── NextGreaterElementII503.java
    ├── NextGreaterElementIII556.java
    ├── NextPermutation31.java
    ├── NonDecreasingArray665.java
    ├── NonOverlappingIntervals435.java
    ├── NumberOfConnectedComponentsInAnUndirectedGraph323.java
    ├── NumberOfCornerRectangles750.java
    ├── NumberOfDigitOne233.java
    ├── NumberOfIslands200.java
    ├── NumberOfIslandsII305.java
    ├── NumberOfLongestIncreasingSubsequence673.java
    ├── NumberOfMatchingSubsequences792.java
    ├── OddEvenLinkedList328.java
    ├── OneEditDistance.java
    ├── OneEditDistance161.java
    ├── OnesAndZeroes474.java
    ├── OpenTheLock752.java
    ├── OptimalAccountBalancing465.java
    ├── OutputContestMatches544.java
    ├── PacificAtlanticWaterFlow417.java
    ├── PaintFence276.java
    ├── PaintHouse256.java
    ├── PaintHouseII265.java
    ├── PalindromeLinkedList234.java
    ├── PalindromeNumber9.java
    ├── PalindromePairs336.java
    ├── PalindromePartitioning131.java
    ├── PalindromePermutationII267.java
    ├── PalindromicSubstrings647.java
    ├── PartitionEqualSubsetSum416.java
    ├── PartitionLabels763.java
    ├── PartitionList86.java
    ├── PartitionToKEqualSumSubsets698.java
    ├── PascalsTriangleII119.java
    ├── PatchingArray330.java
    ├── PathSum112.java
    ├── PathSumII113.java
    ├── PathSumIII437.java
    ├── PeekingIterator284.java
    ├── PerfectSquares279.java
    ├── PermutationInString567.java
    ├── PermutationSequence60.java
    ├── Permutations46.java
    ├── PermutationsII47.java
    ├── PlusOne66.java
    ├── PlusOneLinkedList369.java
    ├── Point.java
    ├── PopulatingNextRightPointersInEachNode116.java
    ├── PopulatingNextRightPointersInEachNodeII117.java
    ├── PossibleBipartition886.java
    ├── PowXN50.java
    ├── PowerOfTwo231.java
    ├── PredictTheWinner486.java
    ├── ProductOfArrayExceptSelf238.java
    ├── ProfitableSchemes879.java
    ├── ProjectionAreaOf3DShapes887.java
    ├── QuadTreeIntersection558.java
    ├── QueueReconstructionByHeight406.java
    ├── RandomFlipMatrix519.java
    ├── RandomListNode.java
    ├── RandomPickIndex398.java
    ├── RangeAddition370.java
    ├── RangeModule715.java
    ├── RangeSumQuery2DImmutable304.java
    ├── RangeSumQuery2DMutable308.java
    ├── RangeSumQueryImmutable303.java
    ├── RangeSumQueryMutable307.java
    ├── RansomNote383.java
    ├── ReadNCharactersGivenRead4IICallMultipleTimes158.java
    ├── ReadNCharactersGivenReadFour157.java
    ├── RearrangeStringKDistanceApart358.java
    ├── ReconstructItinerary332.java
    ├── ReconstructOriginalDigitsFromEnglish423.java
    ├── RectangleArea223.java
    ├── RectangleAreaII850.java
    ├── RectangleOverlap863.java
    ├── RedundantConnection684.java
    ├── RedundantConnectionII685.java
    ├── RegularExpressionMatching10.java
    ├── RemoveDuplicateLetters316.java
    ├── RemoveDuplicatesFromSortedArray26.java
    ├── RemoveDuplicatesFromSortedArrayII80.java
    ├── RemoveDuplicatesFromSortedList83.java
    ├── RemoveDuplicatesFromSortedListII82.java
    ├── RemoveInvalidParentheses301.java
    ├── RemoveLinkedListElements203.java
    ├── RemoveNthNodeFromEndOfList19.java
    ├── ReorderList143.java
    ├── ReorganizeString767.java
    ├── RepeatedDNASequences187.java
    ├── RepeatedStringMatch686.java
    ├── RepeatedSubstringPattern459.java
    ├── ReplaceWords648.java
    ├── RestoreIPAddresses93.java
    ├── ReverseLinkedList206.java
    ├── ReverseLinkedListII92.java
    ├── ReverseNodesInKGroup25.java
    ├── ReverseString344.java
    ├── ReverseStringII541.java
    ├── ReverseVowelsOfAString345.java
    ├── ReverseWordsInAString151.java
    ├── ReverseWordsInAStringII186.java
    ├── ReverseWordsInAStringIII557.java
    ├── RobotRoomCleaner.java
    ├── RomanToInteger13.java
    ├── RotateArray189.java
    ├── RotateFunction396.java
    ├── RotateImage48.java
    ├── RotateList61.java
    ├── RussianDollEnvelopes354.java
    ├── SameTree100.java
    ├── SearchA2DMatrix74.java
    ├── SearchA2DMatrixII240.java
    ├── SearchForARange34.java
    ├── SearchInASortedArrayOfUnknownSize702.java
    ├── SearchInRotatedSortedArray33.java
    ├── SearchInRotatedSortedArrayII81.java
    ├── SearchInsertPosition35.java
    ├── SecondMinimumNodeInABinaryTree671.java
    ├── SentenceScreenFitting418.java
    ├── SentenceSimilarity734.java
    ├── SentenceSimilarityII737.java
    ├── SerializeAndDeserializeBST449.java
    ├── SerializeAndDeserializeBinaryTree297.java
    ├── SetMatrixZeroes73.java
    ├── ShortestBridge934.java
    ├── ShortestCompletingWord748.java
    ├── ShortestDistanceFromAllBuildings317.java
    ├── ShortestPalindrome214.java
    ├── ShortestPathToGetAllKeys864.java
    ├── ShortestSubarrayWithSumAtLeastK862.java
    ├── ShortestWordDistance243.java
    ├── ShuffleAnArray384.java
    ├── SimplifyPath71.java
    ├── SingleElementInASortedArray540.java
    ├── SingleNumber136.java
    ├── SingleNumberII137.java
    ├── SlidingWindowMaximum239.java
    ├── SlidingWindowMedian480.java
    ├── SmallestRange632.java
    ├── SolveTheEquation640.java
    ├── SortArrayByParityII922.java
    ├── SortCharactersByFrequency451.java
    ├── SortColors75.java
    ├── SortList148.java
    ├── SortTransformedArray360.java
    ├── SparseMatrixMultiplication311.java
    ├── SpiralMatrix54.java
    ├── SpiralMatrixII59.java
    ├── SplitArrayIntoConsecutiveSubsequences659.java
    ├── SplitArrayIntoFibonacciSequence842.java
    ├── SplitArrayLargestSum410.java
    ├── SqrtX69.java
    ├── StoneGame877.java
    ├── StringCompression443.java
    ├── StringToInteger8.java
    ├── StrobogrammaticNumber246.java
    ├── StrobogrammaticNumberII247.java
    ├── SubarrayProductLessThanK713.java
    ├── SubarraySumEqualsK560.java
    ├── Subsequence.java
    ├── Subsets78.java
    ├── SubsetsII90.java
    ├── SubtreeOfAnotherTree572.java
    ├── SudokuSolver37.java
    ├── SumOfSquareNumbers633.java
    ├── SumRootToLeafNumbers129.java
    ├── SummaryRanges228.java
    ├── SuperUglyNumber313.java
    ├── SurroundedRegions130.java
    ├── SwapAdjacentInLRString777.java
    ├── SymmetricTree101.java
    ├── TargetSum494.java
    ├── TaskScheduler621.java
    ├── TextJustification68.java
    ├── TheMaze490.java
    ├── TheMazeII505.java
    ├── TheMazeIII499.java
    ├── TheSkylineProblem218.java
    ├── ThirdMaximumNumber414.java
    ├── ThreeSum15.java
    ├── ThreeSumClosest16.java
    ├── ThreeSumSmaller259.java
    ├── ToLowerCase709.java
    ├── TopKFrequentElements347.java
    ├── TopKFrequentWords692.java
    ├── TotalHammingDistance477.java
    ├── TrappingRainWater42.java
    ├── TrappingRainWaterII407.java
    ├── TreeLinkNode.java
    ├── TreeNode.java
    ├── TreeToForestByErasingNodes.java
    ├── Triangle120.java
    ├── TrimABinarySearchTree669.java
    ├── TwoSum1.java
    ├── TwoSumIIInputArrayIsSorted167.java
    ├── TwoSumIVInputIsABST653.java
    ├── UTF8Validation393.java
    ├── UglyNumber263.java
    ├── UglyNumberII264.java
    ├── UncommonWordsFromTwoSentences884.java
    ├── UndirectedGraphNode.java
    ├── UniqueBinarySearchTrees96.java
    ├── UniqueBinarySearchTreesII95.java
    ├── UniqueMorseCodeWords804.java
    ├── UniquePaths62.java
    ├── UniquePathsII63.java
    ├── UniqueWordAbbreviation288.java
    ├── ValidAnagram242.java
    ├── ValidNumber65.java
    ├── ValidPalindrome125.java
    ├── ValidPalindromeII680.java
    ├── ValidParentheses20.java
    ├── ValidParenthesisString678.java
    ├── ValidSudoku36.java
    ├── ValidTriangleNumber611.java
    ├── ValidWordAbbreviation408.java
    ├── ValidateBinarySearchTree98.java
    ├── ValidateStackSequences946.java
    ├── VerifyPreorderSequenceInBinarySearchTree255.java
    ├── WallsAndGates286.java
    ├── WaterAndJugProblem365.java
    ├── WiggleSort280.java
    ├── WiggleSortII324.java
    ├── WiggleSubsequence376.java
    ├── WildcardMatching44.java
    ├── WordAbbreviation527.java
    ├── WordBreak139.java
    ├── WordBreakII140.java
    ├── WordDictionary.java
    ├── WordLadder127.java
    ├── WordLadderII126.java
    ├── WordPattern290.java
    ├── WordPatternII291.java
    ├── WordSearch79.java
    ├── WordSearchII212.java
    ├── WordSquares425.java
    ├── ZeroOneMatrix542.java
    ├── ZigzagIterator281.java
    ├── data-structures/
    │   ├── BinaryIndexedTree.java
    │   ├── BinarySearchTree.java
    │   ├── BinarySearchTreeWithParent.java
    │   ├── DisjointSet.java
    │   ├── LFUCache.java
    │   ├── LRUCache.java
    │   ├── MinHeap.java
    │   ├── Trie.java
    │   └── TrieNode.java
    ├── graph/
    │   ├── Dijkstra.java
    │   ├── README.md
    │   ├── StrongConnectivity.java
    │   └── TopologicalSort.java
    ├── knapsack/
    │   ├── CompleteKnapsack.java
    │   ├── MultipleKnapsack.java
    │   ├── README.md
    │   └── ZeroOneKnapsack.java
    ├── search/
    │   ├── BinarySearch.java
    │   ├── ExponentialSearch.java
    │   ├── InterpolationSearch.java
    │   ├── JumpSearch.java
    │   ├── LinearSearch.java
    │   ├── README.md
    │   └── TernarySearch.java
    └── sort/
        ├── BubbleSort.java
        ├── BucketSort.java
        ├── CountingSort.java
        ├── HeapSort.java
        ├── InsertionSort.java
        ├── MergeSort.java
        ├── QuickSort.java
        ├── README.md
        ├── RadixSort.java
        └── SelectionSort.java

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*.class
.DS_store
.vscode
.idea


================================================
FILE: README.md
================================================
# leetcode-java


| Class Definition |
|:----------------------------------------------------------------------------------:|
| [ListNode](https://github.com/fluency03/leetcode-java/blob/master/src/ListNode.java) |
| [TreeNode](https://github.com/fluency03/leetcode-java/blob/master/src/TreeNode.java) |
| [Interval](https://github.com/fluency03/leetcode-java/blob/master/src/Interval.java) |
| [TreeLinkNode](https://github.com/fluency03/leetcode-java/blob/master/src/TreeLinkNode.java) |
| [UndirectedGraphNode](https://github.com/fluency03/leetcode-java/blob/master/src/UndirectedGraphNode.java) |
| [Point](https://github.com/fluency03/leetcode-java/blob/master/src/Point.java) |


# Search and Sort

| Search ([*README*](https://github.com/fluency03/leetcode-java/tree/master/src/search)) | Sort ([*README*](https://github.com/fluency03/leetcode-java/tree/master/src/sort)) |
|:-:|:-:|
| [Linear Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/LinearSearch.java) | [Selection Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/SelectionSort.java) |
| [Binary Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/BinarySearch.java) | [Bubble Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/BubbleSort.java) |
| [Jump Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/JumpSearch.java) | [Insertion Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/InsertionSort.java) |
| [Interpolation Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/InterpolationSearch.java) | [Merge Sort ](https://github.com/fluency03/leetcode-java/blob/master/src/sort/MergeSort.java)|
| [Exponential Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/ExponentialSearch.java) | [Heap Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/HeapSort.java) |
| [Ternary Search](https://github.com/fluency03/leetcode-java/blob/master/src/search/TernarySearch.java) | [Quick Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/QuickSort.java) |
| [...](http://www.geeksforgeeks.org/fundamentals-of-algorithms/#SearchingandSorting) | [Radix Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/RadixSort.java) |
|  | [Counting Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/CountingSort.java) |
|  | [Bucket Sort](https://github.com/fluency03/leetcode-java/blob/master/src/sort/BucketSort.java) |
|  | Shell Sort |
|  | Comb Sort |
|  | [...](http://www.geeksforgeeks.org/fundamentals-of-algorithms/#SearchingandSorting) |



# [Knapsack Problem](https://github.com/fluency03/leetcode-java/tree/master/src/knapsack)

| Knapsack Problem |
|:----------------------------------------------------------------------------------:|
| [ZeroOneKnapsack](https://github.com/fluency03/leetcode-java/blob/master/src/knapsack/ZeroOneKnapsack.java) |
| [CompleteKnapsack](https://github.com/fluency03/leetcode-java/blob/master/src/knapsack/CompleteKnapsack.java) |



# [Data Structures](https://github.com/fluency03/leetcode-java/tree/master/src/data-structures)

| Data Structures |
|:----------------------------------------------------------------------------------:|
| [TrieNode](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/TrieNode.java) |
| [Trie](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/Trie.java) |
| [LRUCache](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/LRUCache.java) |
| [LFUCache](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/LFUCache.java) |
| [BinarySearchTree](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/BinarySearchTree.java) |
| [BinarySearchTreeWithParent](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/BinarySearchTreeWithParent.java) |
| [BinaryIndexedTree](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/BinaryIndexedTree.java) |
| [MinHeap](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/MinHeap.java) |
| [DisjointSet (Union-Find)](https://github.com/fluency03/leetcode-java/blob/master/src/data-structures/DisjointSet.java) |
| [Graph](https://github.com/fluency03/leetcode-java/blob/master/src/graph) |


# Total: 538

|   Easy  |  Medium | Hard |  -  |
|:-------:|:-------:|:----:|:---:|
|   142   |   292   |  92  | 12  |


| Question | Solution | Difficulty |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------:|:----------:|
| [1. Two Sum](https://leetcode.com/problems/two-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TwoSum1.java) | Easy |
| [2. Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddTwoNumbers2.java) | Medium |
| [3. Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestSubstringWithoutRepeatingCharacters3.java) | Medium |
| [4. Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MedianOfTwoSortedArrays4.java) | Hard |
| [5. Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestPalindromicSubstring5.java) | Medium |
| [9. Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromeNumber9.java) | Easy |
| [8. String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/StringToInteger8.java) | Medium |
| [10. Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RegularExpressionMatching10.java) | Hard |
| [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContainerWithMostWater11.java) | Medium |
| [12. Integer to Roman](https://leetcode.com/problems/integer-to-roman/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntegerToRoman12.java) | Medium |
| [13. Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RomanToInteger13.java) | Easy |
| [14. Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestCommonPrefix14.java) | Easy |
| [15. 3Sum](https://leetcode.com/problems/3sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ThreeSum15.java) | Medium |
| [16. 3Sum Closest](https://leetcode.com/problems/3sum-closest/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ThreeSumClosest16.java) | Medium |
| [17. Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LetterCombinationsOfAPhoneNumber17.java) | Medium |
| [18. 4Sum](https://leetcode.com/problems/4sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FourSum18.java) | Medium |
| [19. Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LetterCombinationsOfAPhoneNumber17.java) | Medium |
| [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidParentheses20.java) | Easy |
| [21. Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MergeTwoSortedLists21.java) | Easy |
| [22. Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GenerateParentheses22.java) | Medium |
| [23. Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MergeKSortedLists23.java) | Hard |
| [25. Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseNodesInKGroup25.java) | Hard |
| [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveDuplicatesFromSortedArray26.java) | Easy |
| [28. Implement strStr()](https://leetcode.com/problems/implement-strstr/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImplementStrStr28.java) | Easy |
| [29. Divide Two Integers](https://leetcode.com/problems/divide-two-integers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DivideTwoIntegers29.java) | Easy |
| [31. Next Permutation](https://leetcode.com/problems/next-permutation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NextPermutation31.java) | Medium |
| [32. Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestValidParentheses32.java) | Hard |
| [33. Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchInRotatedSortedArray33.java) | Medium |
| [34. Search for a Range](https://leetcode.com/problems/search-for-a-range/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchForARange34.java) | Medium |
| [35. Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchInsertPosition35.java) | Easy |
| [36. Valid Sudoku](https://leetcode.com/problems/valid-sudoku/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidSudoku36.java) | Medium |
| [37. Sudoku Solver](https://leetcode.com/problems/sudoku-solver/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SudokuSolver37.java) | Hard |
| [39. Combination Sum](https://leetcode.com/problems/combination-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CombinationSum39.java) | Medium |
| [41. First Missing Positive](https://leetcode.com/problems/first-missing-positive/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FirstMissingPositive41.java) | Hard |
| [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TrappingRainWater42.java) | Hard |
| [44. Wildcard Matching](https://leetcode.com/problems/wildcard-matching/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WildcardMatching44.java) | Hard |
| [45. Jump Game II](https://leetcode.com/problems/jump-game-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/JumpGameII45.java) | Hard |
| [46. Permutations](https://leetcode.com/problems/permutations/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Permutations46.java) | Medium |
| [47. Permutations II](https://leetcode.com/problems/permutations-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PermutationsII47.java) | Medium |
| [48. Rotate Image](https://leetcode.com/problems/rotate-image/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RotateImage48.java) | Medium |
| [49. Group Anagrams](https://leetcode.com/problems/group-anagrams/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GroupAnagrams49.java) | Medium |
| [50. Pow(x, n)](https://leetcode.com/problems/powx-n/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PowXN50.java) | Medium |
| [51. N-Queens](https://leetcode.com/problems/n-queens/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NQueens51.java) | Hard |
| [52. N-Queens II](https://leetcode.com/problems/n-queens-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NQueensII52.java) | Hard |
| [53. Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumSubarray53.java) | Easy |
| [54. Spiral Matrix](https://leetcode.com/problems/spiral-matrix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SpiralMatrix54.java) | Medium |
| [55. Jump Game](https://leetcode.com/problems/jump-game/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/JumpGame55.java) | Medium |
| [56. Merge Intervals](https://leetcode.com/problems/merge-intervals/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MergeIntervals56.java) | Medium |
| [57. Insert Interval](https://leetcode.com/problems/insert-interval/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InsertInterval57.java) | Hard |
| [59. Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SpiralMatrixII59.java) | Medium |
| [60. Permutation Sequence](https://leetcode.com/problems/permutation-sequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PermutationSequence60.java) | Medium |
| [61. Rotate List](https://leetcode.com/problems/rotate-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RotateList61.java) | Medium |
| [62. Unique Paths](https://leetcode.com/problems/unique-paths/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniquePaths62.java) | Medium |
| [63. Unique Paths II](https://leetcode.com/problems/unique-paths-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniquePathsII63.java) | Medium |
| [64. Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumPathSum64.java) | Medium |
| [65. Valid Number](https://leetcode.com/problems/valid-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidNumber65.java) | Hard |
| [66. Plus One](https://leetcode.com/problems/plus-one/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PlusOne66.java) | Easy |
| [67. Add Binary](https://leetcode.com/problems/add-binary/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddBinary67.java) | Easy |
| [68. Text Justification](https://leetcode.com/problems/text-justification/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TextJustification68.java) | Hard |
| [69. Sqrt(x)](https://leetcode.com/problems/sqrtx/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SqrtX69.java) | Easy |
| [70. Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ClimbingStairs70.java) | Easy |
| [71. Simplify Path](https://leetcode.com/problems/simplify-path/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SimplifyPath71.java) | Medium |
| [72. Edit Distance](https://leetcode.com/problems/edit-distance/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EditDistance72.java) | Hard |
| [73. Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SetMatrixZeroes73.java) | Medium |
| [74. Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchA2DMatrix74.java) | Medium |
| [75. Sort Colors](https://leetcode.com/problems/sort-colors/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SortColors75.java) | Medium |
| [76. Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumWindowSubstring76.java) | Hard |
| [78. Subsets](https://leetcode.com/problems/subsets/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Subsets78.java) | Medium |
| [79. Word Search](https://leetcode.com/problems/word-search/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordSearch79.java) | Medium |
| [80. Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveDuplicatesFromSortedArrayII80.java) | Medium |
| [81. Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchInRotatedSortedArrayII81.java) | Medium |
| [82. Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveDuplicatesFromSortedListII82.java) | Medium |
| [83. Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveDuplicatesFromSortedList83.java) | Easy |
| [84. Largest Rectangle in Histogram](https://leetcode.com/problems/largest-rectangle-in-histogram/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LargestRectangleInHistogram84.java) | Hard |
| [85. Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LargestRectangleInHistogram84.java) | Hard |
| [86. Partition List](https://leetcode.com/problems/partition-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PartitionList86.java) | Medium |
| [88. Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MergeSortedArray88.java) | Easy |
| [90. Subsets II](https://leetcode.com/problems/subsets-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SubsetsII90.java) | Medium |
| [91. Decode Ways](https://leetcode.com/problems/decode-ways/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DecodeWays91.java) | Medium |
| [92. Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseLinkedListII92.java) | Medium |
| [93. Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RestoreIPAddresses93.java) | Medium |
| [94. Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeInorderTraversal94.java) | Medium |
| [95. Unique Binary Search Trees II](https://leetcode.com/problems/unique-binary-search-trees-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniqueBinarySearchTreesII95.java) | Medium |
| [96. Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniqueBinarySearchTrees96.java) | Medium |
| [97. Interleaving String](https://leetcode.com/problems/interleaving-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InterleavingString97.java) | Hard |
| [98. Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidateBinarySearchTree98.java) | Medium |
| [100. Same Tree](https://leetcode.com/problems/same-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SameTree100.java) | Easy |
| [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SymmetricTree101.java) | Easy |
| [102. Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeLevelOrderTraversal102.java) | Medium |
| [103. Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeZigzagLevelOrderTraversal103.java) | Medium |
| [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumDepthOfBinaryTree104.java) | Easy |
| [105. Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConstructBinaryTreeFromPreorderAndInorderTraversal105.java) | Medium |
| [106. Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConstructBinaryTreeFromInorderAndPostorderTraversal106.java) | Medium |
| [107. Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeLevelOrderTraversalII107.java) | Easy |
| [108. Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConvertSortedArrayToBinarySearchTree108.java) | Easy |
| [109. Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConvertSortedListToBST109.java) | Medium |
| [110. Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BalancedBinaryTree110.java) | Easy |
| [111. Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumDepthOfBinaryTree111.java) | Easy |
| [112. Path Sum](https://leetcode.com/problems/path-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PathSum112.java) | Easy |
| [113. Path Sum II](https://leetcode.com/problems/path-sum-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PathSumII113.java) | Medium |
| [114. Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FlattenBinaryTreeToLinkedList114.java) | Medium |
| [116. Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PopulatingNextRightPointersInEachNode116.java) | Medium |
| [117. Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PopulatingNextRightPointersInEachNodeII117.java) | Medium |
| [119. Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PascalsTriangleII119.java) | Easy |
| [120. Triangle](https://leetcode.com/problems/triangle/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Triangle120.java) | Medium |
| [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStock121.java) | Easy |
| [122. Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStockII122.java) | Easy |
| [123. Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStockIII123.java) | Hard |
| [124. Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeMaximumPathSum124.java) | Hard |
| [125. Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidPalindrome125.java) | Easy |
| [126. Word Ladder II](https://leetcode.com/problems/word-ladder-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordLadderII126.java) | Hard |
| [127. Word Ladder](https://leetcode.com/problems/word-ladder/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordLadder127.java) | Medium |
| [128. Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestConsecutiveSequence128.java) | Hard |
| [129. Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SumRootToLeafNumbers129.java) | Medium |
| [130. Surrounded Regions](https://leetcode.com/problems/surrounded-regions/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SumRootToLeafNumbers129.java) | Medium |
| [131. Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromePartitioning131.java) | Medium |
| [133. Clone Graph](https://leetcode.com/problems/clone-graph/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CloneGraph133.java) | Medium |
| [136. Single Number](https://leetcode.com/problems/single-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SingleNumber136.java) | Easy |
| [137. Single Number II](https://leetcode.com/problems/single-number-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SingleNumberII137.java) | Medium |
| [138. Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CopyListWithRandomPointer138.java) | Medium |
| [139. Word Break](https://leetcode.com/problems/word-break/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordBreak139.java) | Medium |
| [140. Word Break II](https://leetcode.com/problems/word-break-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordBreakII140.java) | Hard |
| [141. Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LinkedListCycle141.java) | Easy |
| [142. Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LinkedListCycleII142.java) | Easy |
| [143. Reorder List](https://leetcode.com/problems/reorder-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReorderList143.java) | Medium |
| [144. Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreePreorderTraversal144.java) | Medium |
| [146. LRU Cache](https://leetcode.com/problems/lru-cache/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LRUCache146.java) | Hard |
| [147. Insertion Sort List](https://leetcode.com/problems/insertion-sort-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InsertionSortList147.java) | Medium |
| [148. Sort List](https://leetcode.com/problems/sort-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SortList148.java) | Medium |
| [149. Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InsertionSortList147.java) | Hard |
| [150. Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EvaluateReversePolishNotation150.java) | Medium |
| [151. Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseWordsInAString151.java) | Medium |
| [152. Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumProductSubarray152.java) | Medium |
| [153. Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindMinimumInRotatedSortedArray153.java) | Medium |
| [154. Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindMinimumInRotatedSortedArrayII154.java) | Hard |
| [155. Min Stack](https://leetcode.com/problems/min-stack/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinStack.java) | Easy |
| [157. Read N Characters Given Read4](https://leetcode.com/problems/read-n-characters-given-read4/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReadNCharactersGivenReadFour157.java) | Easy |
| [158. Read N Characters Given Read4 II - Call multiple times](https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReadNCharactersGivenRead4IICallMultipleTimes158.java) | Hard |
| [159. Longest Substring with At Most Two Distinct Characters](https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestSubstringWithAtMostTwoDistinctCharacters159.java) | Hard |
| [160. Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntersectionOfTwoLinkedLists160.java) | Easy |
| [161. One Edit Distance](https://leetcode.com/problems/one-edit-distance/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OneEditDistance161.java) | Medium |
| [162. Find Peak Element](https://leetcode.com/problems/find-peak-element/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindPeakElement162.java) | Medium |
| [163. Missing Ranges](https://leetcode.com/problems/missing-ranges/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MissingRanges163.java) | Medium |
| [165. Compare Version Numbers](https://leetcode.com/problems/compare-version-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CompareVersionNumbers165.java) | Medium |
| [166. Fraction to Recurring Decimal](https://leetcode.com/problems/fraction-to-recurring-decimal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FractionToRecurringDecimal166.java) | Medium |
| [167. Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TwoSumIIInputArrayIsSorted167.java) | Easy |
| [169. Majority Element](https://leetcode.com/problems/majority-element/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MajorityElement169.java) | Easy |
| [173. Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinarySearchTreeIterator173.java) | Medium |
| [179. Largest Number](https://leetcode.com/problems/largest-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LargestNumber179.java) | Medium |
| [186. Reverse Words in a String II](https://leetcode.com/problems/reverse-words-in-a-string-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseWordsInAStringII186.java) | Easy |
| [187. Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RepeatedDNASequences187.java) | Medium |
| [188. Best Time to Buy and Sell Stock IV](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStockIV188.java) | Hard |
| [189. Rotate Array](https://leetcode.com/problems/rotate-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RotateArray189.java) | Easy |
| [198. House Robber](https://leetcode.com/problems/house-robber/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HouseRobber198.java) | Easy |
| [199. Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeRightSideView199.java) | Medium |
| [200. Number of Islands](https://leetcode.com/problems/number-of-islands/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfIslands200.java) | Medium |
| [201. Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BitwiseANDOfNumbersRange201.java) | Medium |
| [202. Happy Number](https://leetcode.com/problems/happy-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HappyNumber202.java) | Easy |
| [203. Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveLinkedListElements203.java) | Easy |
| [204. Count Primes](https://leetcode.com/problems/count-primes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountPrimes204.java) | Easy |
| [205. Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IsomorphicStrings205.java) | Easy |
| [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseLinkedList206.java) | Easy |
| [207. Course Schedule](https://leetcode.com/problems/course-schedule/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CourseSchedule207.java) | Medium |
| [208. Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImplementTriePrefixTree208.java) | Medium |
| [209. Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumSizeSubarraySum209.java) | Medium |
| [210. Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CourseScheduleII210.java) | Medium |
| [211. Add and Search Word - Data structure design](https://leetcode.com/problems/add-and-search-word-data-structure-design/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordDictionary.java) | Medium |
| [212. Word Search II](https://leetcode.com/problems/word-search-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordSearchII212.java) | Hard |
| [213. House Robber II](https://leetcode.com/problems/house-robber-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HouseRobberII213.java) | Medium |
| [214. Shortest Palindrome](https://leetcode.com/problems/shortest-palindrome/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestPalindrome214.java) | Medium |
| [215. Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KthLargestElementInAnArray215.java) | Medium |
| [216. Combination Sum III](https://leetcode.com/problems/combination-sum-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CombinationSumIII216.java) | Medium |
| [217. Contains Duplicate](https://leetcode.com/problems/contains-duplicate/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContainsDuplicate217.java) | Easy |
| [218. The Skyline Problem](https://leetcode.com/problems/the-skyline-problem/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TheSkylineProblem218.java) | Hard |
| [219. Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContainsDuplicatesII219.java) | Easy |
| [220. Contains Duplicate III](https://leetcode.com/problems/contains-duplicate-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContainsDuplicateIII220.java) | Medium |
| [221. Maximal Square](https://leetcode.com/problems/maximal-square/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximalSquare221.java) | Medium |
| [223. Rectangle Area](https://leetcode.com/problems/rectangle-area/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximalSquare221.java) | Medium |
| [224. Basic Calculator](https://leetcode.com/problems/basic-calculator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BasicCalculator224.java) | Hard |
| [225. Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImplementStackUsingQueues225.java) | Easy |
| [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InvertBinaryTree226.java) | Easy |
| [227. Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BasicCalculatorII227.java) | Medium |
| [228. Summary Ranges](https://leetcode.com/problems/summary-ranges/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SummaryRanges228.java) | Medium |
| [230. Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KthSmallestElementInABST230.java) | Medium |
| [231. Power of Two](https://leetcode.com/problems/power-of-two/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PowerOfTwo231.java) | Easy |
| [232. Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImplementQueueUsingStacks232.java) | Easy |
| [233. Number of Digit One](https://leetcode.com/problems/number-of-digit-one/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfDigitOne233.java) | Hard |
| [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromeLinkedList234.java) | Easy |
| [235. Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LowestCommonAncestorOfABinarySearchTree235.java) | Easy |
| [236. Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LowestCommonAncestorOfABinaryTree236.java) | Medium |
| [237. Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DeleteNodeInALinkedList237.java) | Easy |
| [238. Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ProductOfArrayExceptSelf238.java) | Medium |
| [239. Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SlidingWindowMaximum239.java) | Hard |
| [240. Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchA2DMatrixII240.java) | Medium |
| [241. Different Ways to Add Parentheses](https://leetcode.com/problems/different-ways-to-add-parentheses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DifferentWaysToAddParentheses241.java) | Medium |
| [242. Valid Anagram](https://leetcode.com/problems/valid-anagram/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidAnagram242.java) | Easy |
| [243. Shortest Word Distance](https://leetcode.com/problems/shortest-word-distance/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestWordDistance243.java) | Easy |
| [246. Strobogrammatic Number](https://leetcode.com/problems/strobogrammatic-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/StrobogrammaticNumber246.java) | Easy |
| [247. Strobogrammatic Number II](https://leetcode.com/problems/strobogrammatic-number-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/StrobogrammaticNumberII247.java) | Medium |
| [249. Group Shifted Strings](https://leetcode.com/problems/group-shifted-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GroupShiftedStrings249.java) | Medium |
| [251. Flatten 2D Vector](https://leetcode.com/problems/flatten-2d-vector/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Flatten2DVector251.java) | Medium |
| [252. Meeting Rooms](https://leetcode.com/problems/meeting-rooms/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MeetingRooms252.java) | Easy |
| [253. Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MeetingRoomsII253.java) | Medium |
| [255. Verify Preorder Sequence in Binary Search Tree](https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/VerifyPreorderSequenceInBinarySearchTree255.java) | Medium |
| [256. Paint House](https://leetcode.com/problems/paint-house/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PaintHouse256.java) | Easy |
| [257. Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreePaths257.java) | Easy |
| [259. 3Sum Smaller](https://leetcode.com/problems/3sum-smaller/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ThreeSumSmaller259.java) | Medium |
| [261. Graph Valid Tree](https://leetcode.com/problems/graph-valid-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GraphValidTree261.java) | Medium |
| [263. Ugly Number](https://leetcode.com/problems/ugly-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UglyNumber263.java) | Easy |
| [264. Ugly Number II](https://leetcode.com/problems/ugly-number-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UglyNumberII264.java) | Medium |
| [265. Paint House II](https://leetcode.com/problems/paint-house-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PaintHouseII265.java) | Hard |
| [267. Palindrome Permutation II](https://leetcode.com/problems/palindrome-permutation-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromePermutationII267.java) | Medium |
| [268. Missing Number](https://leetcode.com/problems/missing-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MissingNumber268.java) | Easy |
| [269. Alien Dictionary](https://leetcode.com/problems/alien-dictionary/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AlienDictionary269.java) | Hard |
| [270. Closest Binary Search Tree Value](https://leetcode.com/problems/closest-binary-search-tree-value/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ClosestBinarySearchTreeValue270.java) | Easy |
| [271. Encode and Decode Strings](https://leetcode.com/problems/encode-and-decode-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EncodeAndDecodeStrings271.java) | Medium |
| [272. Closest Binary Search Tree Value II](https://leetcode.com/problems/closest-binary-search-tree-value-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ClosestBinarySearchTreeValueII272.java) | Medium |
| [273. Integer to English Words](https://leetcode.com/problems/integer-to-english-words/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntegerToEnglishWords273.java) | Hard |
| [274. H-Index](https://leetcode.com/problems/h-index/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntegerToEnglishWords273.java) | Medium |
| [276. Paint Fence](https://leetcode.com/problems/paint-fence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PaintFence276.java) | Easy |
| [277. Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindTheCelebrity277.java) | Medium |
| [278. First Bad Version](https://leetcode.com/problems/first-bad-version/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FirstBadVersion278.java) | Easy |
| [279. Perfect Squares](https://leetcode.com/problems/perfect-squares/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PerfectSquares279.java) | Medium |
| [280. Wiggle Sort](https://leetcode.com/problems/wiggle-sort/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WiggleSort280.java) | Medium |
| [281. Zigzag Iterator](https://leetcode.com/problems/zigzag-iterator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ZigzagIterator281.java) | Medium |
| [282. Expression Add Operators](https://leetcode.com/problems/expression-add-operators/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ExpressionAddOperators282.java) | Hard |
| [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MoveZeroes283.java) | Easy |
| [284. Peeking Iterator](https://leetcode.com/problems/peeking-iterator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PeekingIterator284.java) | Medium |
| [285. Inorder Successor in BST](https://leetcode.com/problems/inorder-successor-in-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InorderSuccessorInBST285.java) | Medium |
| [286. Walls and Gates](https://leetcode.com/problems/walls-and-gates/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WallsAndGates286.java) | Medium |
| [287. Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindTheDuplicateNumber287.java) | Medium |
| [288. Unique Word Abbreviation](https://leetcode.com/problems/unique-word-abbreviation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniqueWordAbbreviation288.java) | Medium |
| [289. Game of Life](https://leetcode.com/problems/game-of-life/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GameOfLife289.java) | Medium |
| [290. Word Pattern](https://leetcode.com/problems/word-pattern/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordPattern290.java) | Easy |
| [291. Word Pattern II](https://leetcode.com/problems/word-pattern-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordPatternII291.java) | Hard |
| [293. Flip Game](https://leetcode.com/problems/flip-game/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FlipGame293.java) | Easy |
| [295. Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindMedianFromDataStream295.java) | Hard |
| [296. Best Meeting Point](https://leetcode.com/problems/best-meeting-point/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestMeetingPoint296.java) | Hard |
| [297. Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SerializeAndDeserializeBinaryTree297.java) | Hard |
| [298. Binary Tree Longest Consecutive Sequence](https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeLongestConsecutiveSequence298.java) | Medium |
| [299. Bulls and Cows](https://leetcode.com/problems/bulls-and-cows/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BullsAndCows299.java) | Medium |
| [300. Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestIncreasingSubsequence300.java) | Medium |
| [301. Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RemoveInvalidParentheses301.java) | Hard |
| [303. Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeSumQueryImmutable303.java) | Easy |
| [304. Range Sum Query 2D - Immutable](https://leetcode.com/problems/range-sum-query-2d-immutable/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeSumQuery2DImmutable304.java) | Medium |
| [305. Number of Islands II](https://leetcode.com/problems/number-of-islands-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfIslandsII305.java) | Hard |
| [307. Range Sum Query - Mutable](https://leetcode.com/problems/range-sum-query-mutable/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeSumQueryMutable307.java) | Medium |
| [308. Range Sum Query 2D - Mutable](https://leetcode.com/problems/range-sum-query-2d-mutable/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeSumQuery2DMutable308.java) | Hard |
| [309. Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStockWithCooldown309.java) | Medium |
| [310. Minimum Height Trees](https://leetcode.com/problems/minimum-height-trees/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumHeightTrees310.java) | Medium |
| [311. Sparse Matrix Multiplication](https://leetcode.com/problems/sparse-matrix-multiplication/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SparseMatrixMultiplication311.java) | Medium |
| [312. Burst Balloons](https://leetcode.com/problems/burst-balloons/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BurstBalloons312.java) | Hard |
| [313. Super Ugly Number](https://leetcode.com/problems/super-ugly-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SuperUglyNumber313.java) | Medium |
| [314. Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BinaryTreeVerticalOrderTraversal314.java) | Medium |
| [315. Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountOfSmallerNumbersAfterSelf315.java) | Hard |
| [317. Shortest Distance from All Buildings](https://leetcode.com/problems/shortest-distance-from-all-buildings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestDistanceFromAllBuildings317.java) | Hard |
| [318. Maximum Product of Word Lengths](https://leetcode.com/problems/maximum-product-of-word-lengths/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumProductOfWordLengths318.java) | Medium |
| [320. Generalized Abbreviation](https://leetcode.com/problems/generalized-abbreviation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GeneralizedAbbreviation320.java) | Medium |
| [322. Coin Change](https://leetcode.com/problems/coin-change/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountOfSmallerNumbersAfterSelf315.java) | Medium |
| [323. Number of Connected Components in an Undirected Graph](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfConnectedComponentsInAnUndirectedGraph323.java) | Medium |
| [324. Wiggle Sort II](https://leetcode.com/problems/wiggle-sort-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WiggleSortII324.java) | Medium |
| [325. Maximum Size Subarray Sum Equals k](https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumSizeSubarraySumEqualsK325.java) | Medium |
| [327. Count of Range Sum](https://leetcode.com/problems/count-of-range-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountOfRangeSum327.java) | Hard |
| [328. Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OddEvenLinkedList328.java) | Medium |
| [332. Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReconstructItinerary332.java) | Medium |
| [333. Largest BST Subtree](https://leetcode.com/problems/largest-bst-subtree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LargestBSTSubtree333.java) | Medium |
| [334. Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IncreasingTripletSubsequence334.java) | Medium |
| [336. Palindrome Pairs](https://leetcode.com/problems/palindrome-pairs/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromePairs336.java) | Hard |
| [337. House Robber III](https://leetcode.com/problems/house-robber-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HouseRobberIII337.java) | Medium |
| [338. Counting Bits](https://leetcode.com/problems/counting-bits/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountingBits338.java) | Medium |
| [339. Nested List Weight Sum](https://leetcode.com/problems/nested-list-weight-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NestedListWeightSum339.java) | Easy |
| [340. Longest Substring with At Most K Distinct Characters](https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestSubstringWithAtMostKDistinctCharacters340.java) | Hard |
| [341. Flatten Nested List Iterator](https://leetcode.com/problems/flatten-nested-list-iterator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NestedIterator.java) | Medium |
| [343. Integer Break](https://leetcode.com/problems/integer-break/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntegerBreak343.java) | Medium |
| [344. Reverse String](https://leetcode.com/problems/reverse-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseString344.java) | Easy |
| [345. Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseVowelsOfAString345.java) | Easy |
| [346. Moving Average from Data Stream](https://leetcode.com/problems/moving-average-from-data-stream/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MovingAverageFromDataStream346.java) | Easy |
| [347. Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TopKFrequentElements347.java) | Medium |
| [348. Design Tic-Tac-Toe](https://leetcode.com/problems/design-tic-tac-toe/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignTicTacToe348.java) | Medium |
| [349. Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntersectionOfTwoArrays349.java) | Easy |
| [350. Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IntersectionOfTwoArraysII350.java) | Easy |
| [351. Android Unlock Patterns](https://leetcode.com/problems/android-unlock-patterns/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AndroidUnlockPatterns351.java) | Medium |
| [352. Data Stream as Disjoint Intervals](https://leetcode.com/problems/data-stream-as-disjoint-intervals/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DataStreamAsDisjointIntervals352.java) | Hard |
| [353. Design Snake Game](https://leetcode.com/problems/design-snake-game/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignSnakeGame353.java) | Medium |
| [354. Russian Doll Envelopes](https://leetcode.com/problems/russian-doll-envelopes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RussianDollEnvelopes354.java) | Hard |
| [355. Design Twitter](https://leetcode.com/problems/design-twitter/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignTwitter355.java) | Medium |
| [357. Count Numbers with Unique Digits](https://leetcode.com/problems/count-numbers-with-unique-digits/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CountNumbersWithUniqueDigits357.java) | Medium |
| [358. Rearrange String k Distance Apart](https://leetcode.com/problems/rearrange-string-k-distance-apart/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RearrangeStringKDistanceApart358.java) | Hard |
| [359. Logger Rate Limiter](https://leetcode.com/problems/logger-rate-limiter/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LoggerRateLimiter359.java) | Easy |
| [360. Sort Transformed Array](https://leetcode.com/problems/sort-transformed-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SortTransformedArray360.java) | Medium |
| [361. Bomb Enemy](https://leetcode.com/problems/bomb-enemy/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BombEnemy361.java) | Medium |
| [362. Design Hit Counter](https://leetcode.com/problems/design-hit-counter/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignHitCounter362.java) | Medium |
| [363. Max Sum of Rectangle No Larger Than K](https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxSumOfRectangleNoLargerThanK363.java) | Hard |
| [365. Water and Jug Problem](https://leetcode.com/problems/water-and-jug-problem/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WaterAndJugProblem365.java) | Medium |
| [368. Largest Divisible Subset](https://leetcode.com/problems/largest-divisible-subset/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LargestDivisibleSubset368.java) | Medium |
| [369. Plus One Linked List](https://leetcode.com/problems/plus-one-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PlusOneLinkedList369.java) | Medium |
| [370. Range Addition](https://leetcode.com/problems/range-addition/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeAddition370.java) | Medium |
| [373. Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindKPairsWithSmallestSums373.java) | Medium |
| [375. Guess Number Higher or Lower II](https://leetcode.com/problems/guess-number-higher-or-lower-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GuessNumberHigherOrLowerII375.java) | Medium |
| [377. Combination Sum IV](https://leetcode.com/problems/combination-sum-iv/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CombinationSumIV377.java) | Medium |
| [378. Kth Smallest Element in a Sorted Matrix](https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KthSmallestElementInASortedMatrix378.java) | Medium |
| [380. Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InsertDeleteGetRandomOOne380.java) | Medium |
| [382. Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LinkedListRandomNode382.java) | Medium |
| [383. Ransom Note](https://leetcode.com/problems/ransom-note/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RansomNote383.java) | Easy |
| [384. Shuffle an Array](https://leetcode.com/problems/shuffle-an-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShuffleAnArray384.java) | Medium |
| [386. Lexicographical Numbers](https://leetcode.com/problems/lexicographical-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LexicographicalNumbers386.java) | Medium |
| [387. First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FirstUniqueCharacterInAString387.java) | Easy |
| [388. Longest Absolute File Path](https://leetcode.com/problems/longest-absolute-file-path/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestAbsoluteFilePath388.java) | Medium |
| [392. Is Subsequence](https://leetcode.com/problems/is-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IsSubsequence392.java) | Medium |
| [393. UTF-8 Validation](https://leetcode.com/problems/utf-8-validation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UTF8Validation393.java) | Medium |
| [394. Decode String](https://leetcode.com/problems/decode-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DecodeString394.java) | Medium |
| [396. Rotate Function](https://leetcode.com/problems/rotate-function/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RotateFunction396.java) | Medium |
| [399. Evaluate Division](https://leetcode.com/problems/evaluate-division/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EvaluateDivision399.java) | Medium |
| [403. Frog Jump](https://leetcode.com/problems/frog-jump/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FrogJump403.java) | Hard |
| [405. Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConvertANumberToHexadecimal405.java) | Easy |
| [406. Queue Reconstruction by Height](https://leetcode.com/problems/queue-reconstruction-by-height/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/QueueReconstructionByHeight406.java) | Medium |
| [407. Trapping Rain Water II](https://leetcode.com/problems/trapping-rain-water-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TrappingRainWaterII407.java) | Medium |
| [408. Valid Word Abbreviation](https://leetcode.com/problems/valid-word-abbreviation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidWordAbbreviation408.java) | Easy |
| [409. Longest Palindrome](https://leetcode.com/problems/longest-palindrome/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestPalindrome409.java) | Easy |
| [410. Split Array Largest Sum](https://leetcode.com/problems/split-array-largest-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SplitArrayLargestSum410.java) | Hard |
| [412. Fizz Buzz](https://leetcode.com/problems/fizz-buzz/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FizzBuzz412.java) | Easy |
| [414. Third Maximum Number](https://leetcode.com/problems/third-maximum-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ThirdMaximumNumber414.java) | Easy |
| [415. Add Strings](https://leetcode.com/problems/add-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddStrings415.java) | Easy |
| [416. Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PartitionEqualSubsetSum416.java) | Medium |
| [417. Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PacificAtlanticWaterFlow417.java) | Medium |
| [418. Sentence Screen Fitting](https://leetcode.com/problems/sentence-screen-fitting/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SentenceScreenFitting418.java) | Medium |
| [421. Maximum XOR of Two Numbers in an Array](https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumXOROfTwoNumbersInAnArray421.java) | Medium |
| [423. Reconstruct Original Digits from English](https://leetcode.com/problems/reconstruct-original-digits-from-english/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReconstructOriginalDigitsFromEnglish423.java) | Medium |
| [424. Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestRepeatingCharacterReplacement424.java) | Medium |
| [425. Word Squares](https://leetcode.com/problems/word-squares/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordSquares425.java) | Hard |
| [427. Construct Quad Tree](https://leetcode.com/problems/construct-quad-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConstructQuadTree427.java) | Easy |
| [429. N-ary Tree Level Order Traversal](https://leetcode.com/problems/n-ary-tree-level-order-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NaryTreeLevelOrderTraversal429.java) | Easy |
| [432. All O`one Data Structure](https://leetcode.com/problems/all-oone-data-structure/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AllOOneDataStructure432.java) | Hard |
| [433. Minimum Genetic Mutation](https://leetcode.com/problems/minimum-genetic-mutation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumGeneticMutation433.java) | Medium |
| [435. Non-overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NonOverlappingIntervals435.java) | Medium |
| [437. Path Sum III](https://leetcode.com/problems/path-sum-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PathSumIII437.java) | Easy |
| [438. Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindAllAnagramsInAString438.java) | Easy |
| [443. String Compression](https://leetcode.com/problems/string-compression/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/StringCompression443.java) | Easy |
| [445. Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddTwoNumbersII445.java) | Medium |
| [448. Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindAllNumbersDisappearedInAnArray448.java) | Easy |
| [449. Serialize and Deserialize BST](https://leetcode.com/problems/serialize-and-deserialize-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SerializeAndDeserializeBST449.java) | Medium |
| [450. Delete Node in a BST](https://leetcode.com/problems/delete-node-in-a-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DeleteNodeInABST450.java) | Medium |
| [454. 4Sum II](https://leetcode.com/problems/4sum-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FourSumII454.java) | Medium |
| [451. Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SortCharactersByFrequency451.java) | Medium |
| [459. Repeated Substring Pattern](https://leetcode.com/problems/repeated-substring-pattern/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RepeatedSubstringPattern459.java) | Easy |
| [460. LFU Cache](https://leetcode.com/problems/lfu-cache/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LFUCache460.java) | Hard |
| [462. Minimum Moves to Equal Array Elements II](https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumMovesToEqualArrayElementsII462.java) | Medium |
| [463. Island Perimeter](https://leetcode.com/problems/island-perimeter/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IslandPerimeter463.java) | Easy |
| [464. Can I Win](https://leetcode.com/problems/can-i-win/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CanIWin464.java) | Medium |
| [465. Optimal Account Balancing](https://leetcode.com/problems/optimal-account-balancing/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OptimalAccountBalancing465.java) | Hard |
| [472. Concatenated Words](https://leetcode.com/problems/concatenated-words/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConcatenatedWords472.java) | Hard |
| [473. Matchsticks to Square](https://leetcode.com/problems/matchsticks-to-square/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MatchsticksToSquare473.java) | Medium |
| [474. Ones and Zeroes](https://leetcode.com/problems/ones-and-zeroes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OnesAndZeroes474.java) | Medium |
| [477. Total Hamming Distance](https://leetcode.com/problems/total-hamming-distance) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TotalHammingDistance477.java) | Medium |
| [480. Sliding Window Median](https://leetcode.com/problems/sliding-window-median/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SlidingWindowMedian480.java) | Hard |
| [481. Magical String](https://leetcode.com/problems/magical-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MagicalString481.java) | Medium |
| [482. License Key Formatting](https://leetcode.com/problems/license-key-formatting/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LicenseKeyFormatting482.java) | Easy |
| [485. Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxConsecutiveOnes485.java) | Easy |
| [486. Predict the Winner](https://leetcode.com/problems/predict-the-winner/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PredictTheWinner486.java) | Medium |
| [487. Max Consecutive Ones II](https://leetcode.com/problems/max-consecutive-ones-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxConsecutiveOnesII487.java) | Medium |
| [490. The Maze](https://leetcode.com/problems/the-maze/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TheMaze490.java) | Medium |
| [491. Increasing Subsequences](https://leetcode.com/problems/increasing-subsequences/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IncreasingSubsequences491.java) | Medium |
| [494. Target Sum](https://leetcode.com/problems/target-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TargetSum494.java) | Medium |
| [496. Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NextGreaterElementI496.java) | Easy |
| [498. Diagonal Traverse](https://leetcode.com/problems/diagonal-traverse/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DiagonalTraverse498.java) | Medium |
| [499. The Maze III](https://leetcode.com/problems/the-maze-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TheMazeIII499.java) | Hard |
| [503. Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NextGreaterElementII503.java) | Medium |
| [505. The Maze II](https://leetcode.com/problems/the-maze-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TheMazeII505.java) | Hard |
| [508. Most Frequent Subtree Sum](https://leetcode.com/problems/most-frequent-subtree-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MostFrequentSubtreeSum508.java) | Medium |
| [513. Find Bottom Left Tree Value](https://leetcode.com/problems/find-bottom-left-tree-value/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindBottomLeftTreeValue513.java) | Medium |
| [515. Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindLargestValueInEachTreeRow515.java) | Medium |
| [516. Longest Palindromic Subsequence](https://leetcode.com/problems/longest-palindromic-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestPalindromicSubsequence516.java) | Medium |
| [518. Coin Change 2](https://leetcode.com/problems/coin-change-2/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CoinChangeII518.java) | Medium |
| [519. Random Flip Matrix](https://leetcode.com/problems/random-flip-matrix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RandomFlipMatrix519.java) | Medium |
| [523. Continuous Subarray Sum](https://leetcode.com/problems/continuous-subarray-sum/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContinuousSubarraySum523.java) | Medium |
| [525. Contiguous Array](https://leetcode.com/problems/contiguous-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ContiguousArray525.java) | Medium |
| [527. Word Abbreviation](https://leetcode.com/problems/word-abbreviation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/WordAbbreviation527.java) | Hard |
| [529. Minesweeper](https://leetcode.com/problems/minesweeper/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Minesweeper529.java) | Medium |
| [530. Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumAbsoluteDifferenceInBST530.java) | Easy |
| [531. Lonely Pixel I](https://leetcode.com/problems/lonely-pixel-i/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LonelyPixelI531.java) | Medium |
| [535. Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EncodeAndDecodeTinyURL535.java) | Medium |
| [536. Construct Binary Tree from String](https://leetcode.com/problems/construct-binary-tree-from-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConstructBinaryTreeFromString536.java) | Medium |
| [538. Convert BST to Greater Tree](https://leetcode.com/problems/convert-bst-to-greater-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConvertBSTToGreaterTree538.java) | Easy |
| [540. Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SingleElementInASortedArray540.java) | Medium |
| [541. Reverse String II](https://leetcode.com/problems/reverse-string-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseStringII541.java) | Easy |
| [542. 01 Matrix](https://leetcode.com/problems/01-matrix/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ZeroOneMatrix542.java) | Medium |
| [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DiameterOfBinaryTree543.java) | Easy |
| [544. Output Contest Matches](https://leetcode.com/problems/output-contest-matches/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OutputContestMatches544.java) | Medium |
| [545. Boundary of Binary Tree](https://leetcode.com/problems/boundary-of-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BoundaryOfBinaryTree545.java) | Medium |
| [547. Friend Circles](https://leetcode.com/problems/friend-circles/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FriendCircles547.java) | Medium |
| [554. Brick Wall](https://leetcode.com/problems/brick-wall/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BrickWall554.java) | Medium |
| [556. Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NextGreaterElementIII556.java) | Medium |
| [557. Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReverseWordsInAStringIII557.java) | Easy |
| [558. Quad Tree Intersection](https://leetcode.com/problems/quad-tree-intersection/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/QuadTreeIntersection558.java) | Easy |
| [560. Subarray Sum Equals K](https://leetcode.com/problems/subarray-sum-equals-k/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SubarraySumEqualsK560.java) | Medium |
| [567. Permutation in String](https://leetcode.com/problems/permutation-in-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PermutationInString567.java) | Easy |
| [568. Maximum Vacation Days](https://leetcode.com/problems/maximum-vacation-days/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumVacationDays568.java) | Hard |
| [572. Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SubtreeOfAnotherTree572.java) | Easy |
| [582. Kill Process](https://leetcode.com/problems/kill-process/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KillProcess582.java) | Medium |
| [588. Design In-Memory File System](https://leetcode.com/problems/design-in-memory-file-system/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignInMemoryFileSystem588.java) | Hard |
| [590. N-ary Tree Postorder Traversal](https://leetcode.com/problems/n-ary-tree-postorder-traversal/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NaryTreePostorderTraversal590.java) | Easy |
| [594. Longest Harmonious Subsequence](https://leetcode.com/problems/longest-harmonious-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestHarmoniousSubsequence594.java) | Easy |
| [604. Design Compressed String Iterator](https://leetcode.com/problems/design-compressed-string-iterator/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignCompressedStringIterator604.java) | Easy |
| [611. Valid Triangle Number](https://leetcode.com/problems/valid-triangle-number/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidTriangleNumber611.java) | Medium |
| [616. Add Bold Tag in String](https://leetcode.com/problems/add-bold-tag-in-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddBoldTagInString616.java) | Medium |
| [621. Task Scheduler](https://leetcode.com/problems/task-scheduler/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TaskScheduler621.java) | Medium |
| [622. Design Circular Queue](https://leetcode.com/problems/design-circular-queue/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignCircularQueue622.java) | Medium |
| [623. Add One Row to Tree](https://leetcode.com/problems/add-one-row-to-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AddOneRowToTree623.java) | Medium |
| [628. Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumProductOfThreeNumbers628.java) | Easy |
| [632. Smallest Range](https://leetcode.com/problems/smallest-range/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SmallestRange632.java) | Hard |
| [633. Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SumOfSquareNumbers633.java) | Easy |
| [635. Design Log Storage System](https://leetcode.com/problems/design-log-storage-system/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignLogStorageSystem635.java) | Hard |
| [636. Exclusive Time of Functions](https://leetcode.com/problems/exclusive-time-of-functions/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ExclusiveTimeOfFunctions636.java) | Medium |
| [637. Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AverageOfLevelsInBinaryTree637.java) | Easy |
| [639. Decode Ways II](https://leetcode.com/problems/decode-ways-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DecodeWaysII639.java) | Hard |
| [640. Solve the Equation](https://leetcode.com/problems/solve-the-equation/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SolveTheEquation640.java) | Medium |
| [641. Design Circular Deque](https://leetcode.com/problems/design-circular-deque/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignCircularDeque641.java) | Medium |
| [642. Design Search Autocomplete System](https://leetcode.com/problems/design-search-autocomplete-system/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignSearchAutocompleteSystem642.java) | Hard |
| [643. Maximum Average Subarray I](https://leetcode.com/problems/maximum-average-subarray-i/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumAverageSubarrayI643.java) | Easy |
| [646. Maximum Length of Pair Chain](https://leetcode.com/problems/maximum-length-of-pair-chain/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumLengthOfPairChain646.java) | Medium |
| [647. Palindromic Substrings](https://leetcode.com/problems/palindromic-substrings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PalindromicSubstrings647.java) | Medium |
| [648. Replace Words](https://leetcode.com/problems/replace-words/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReplaceWords648.java) | Medium |
| [652. Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindDuplicateSubtrees652.java) | Medium |
| [653. Two Sum IV - Input is a BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TwoSumIVInputIsABST653.java) | Easy |
| [654. Maximum Binary Tree](https://leetcode.com/problems/maximum-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumBinaryTree654.java) | Medium |
| [657. Judge Route Circle](https://leetcode.com/problems/judge-route-circle/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/JudgeRouteCircle657.java) | Easy |
| [658. Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements//) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindKClosestElements658.java) | Medium |
| [659. Split Array into Consecutive Subsequences](https://leetcode.com/problems/split-array-into-consecutive-subsequences/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SplitArrayIntoConsecutiveSubsequences659.java) | Medium |
| [661. Image Smoother](https://leetcode.com/problems/image-smoother/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImageSmoother661.java) | Easy |
| [662. Maximum Width of Binary Tree](https://leetcode.com/problems/maximum-width-of-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumWidthOfBinaryTree662.java) | Medium |
| [663. Equal Tree Partition](https://leetcode.com/problems/equal-tree-partition/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EqualTreePartition663.java) | Medium |
| [665. Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NonDecreasingArray665.java) | Easy |
| [669. Trim a Binary Search Tree](https://leetcode.com/problems/trim-a-binary-search-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TrimABinarySearchTree669.java) | Easy |
| [671. Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SecondMinimumNodeInABinaryTree671.java) | Easy |
| [673. Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfLongestIncreasingSubsequence673.java) | Medium |
| [674. Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestContinuousIncreasingSubsequence674.java) | Easy |
| [675. Cut Off Trees for Golf Event](https://leetcode.com/problems/cut-off-trees-for-golf-event/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CutOffTreesForGolfEvent675.java) | Hard |
| [676. Implement Magic Dictionary](https://leetcode.com/problems/implement-magic-dictionary/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ImplementMagicDictionary676.java) | Medium |
| [677. Map Sum Pairs](https://leetcode.com/problems/map-sum-pairs/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MapSumPairs677.java) | Medium |
| [678. Valid Parenthesis String](https://leetcode.com/problems/valid-parenthesis-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidParenthesisString678.java) | Medium |
| [680. Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ValidPalindromeII680.java) | Easy |
| [681. Next Closest Time](https://leetcode.com/problems/next-closest-time/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NextClosestTime681.java) | Medium |
| [682. Baseball Game](https://leetcode.com/problems/baseball-game/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BaseballGame682.java) | Easy |
| [683. K Empty Slots](https://leetcode.com/problems/k-empty-slots/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KEmptySlots683.java) | Hard |
| [684. Redundant Connection](https://leetcode.com/problems/redundant-connection/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RedundantConnection684.java) | Medium |
| [685. Redundant Connection II](https://leetcode.com/problems/redundant-connection-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RedundantConnectionII685.java) | Hard |
| [686. Repeated String Match](https://leetcode.com/problems/repeated-string-match/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RepeatedStringMatch686.java) | Easy |
| [687. Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestUnivaluePath687.java) | Easy |
| [689. Maximum Sum of 3 Non-Overlapping Subarrays](https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumSumOf3NonOverlappingSubarrays689.java) | Hard |
| [692. Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TopKFrequentWords692.java) | Medium |
| [695. Max Area of Island](https://leetcode.com/problems/max-area-of-island/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxAreaOfIsland695.java) | Medium |
| [698. Partition to K Equal Sum Subsets](https://leetcode.com/problems/partition-to-k-equal-sum-subsets/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PartitionToKEqualSumSubsets698.java) | Medium |
| [702. Search in a Sorted Array of Unknown Size](https://leetcode.com/problems/search-in-a-sorted-array-of-unknown-size/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SearchInASortedArrayOfUnknownSize702.java) | Medium |
| [705. Design HashSet](https://leetcode.com/problems/design-hashset/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignHashSet705.java) | Easy |
| [706. Design HashMap](https://leetcode.com/problems/design-hashmap/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignHashMap706.java) | Easy |
| [707. Design Linked List](https://leetcode.com/problems/design-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DesignLinkedList707.java) | Easy |
| [709. To Lower Case](https://leetcode.com/problems/to-lower-case/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ToLowerCase709.java) | Easy |
| [712. Minimum ASCII Delete Sum for Two Strings](https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumASCIIDeleteSumForTwoStrings712.java) | Medium |
| [713. Subarray Product Less Than K](https://leetcode.com/problems/subarray-product-less-than-k/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SubarrayProductLessThanK713.java) | Medium |
| [714. Best Time to Buy and Sell Stock with Transaction Fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BestTimeToBuyAndSellStockWithTransactionFee714.java) | Medium |
| [715. Range Module](https://leetcode.com/problems/range-module/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RangeModule715.java) | Hard |
| [716. Max Stack](https://leetcode.com/problems/max-stack/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxStack716.java) | Hard |
| [718. Maximum Length of Repeated Subarray](https://leetcode.com/problems/maximum-length-of-repeated-subarray/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumLengthOfRepeatedSubarray718.java) | Medium |
| [719. Find K-th Smallest Pair Distance](https://leetcode.com/problems/find-k-th-smallest-pair-distance/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindKthSmallestPairDistance719.java) | Hard |
| [720. Longest Word in Dictionary](https://leetcode.com/problems/longest-word-in-dictionary/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestWordInDictionary720.java) | Easy |
| [721. Accounts Merge](https://leetcode.com/problems/accounts-merge/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AccountsMerge721.java) | Medium |
| [727. Minimum Window Subsequence](https://leetcode.com/problems/minimum-window-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumWindowSubsequence727.java) | Hard |
| [729. My Calendar I](https://leetcode.com/problems/my-calendar-i/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MyCalendarI729.java) | Medium |
| [731. My Calendar II](https://leetcode.com/problems/my-calendar-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MyCalendarII731.java) | Medium |
| [734. Sentence Similarity](https://leetcode.com/problems/sentence-similarity/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SentenceSimilarity734.java) | Easy |
| [737. Sentence Similarity II](https://leetcode.com/problems/sentence-similarity-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SentenceSimilarityII737.java) | Medium |
| [738. Monotone Increasing Digits](https://leetcode.com/problems/monotone-increasing-digits/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MonotoneIncreasingDigits738.java) | Medium |
| [739. Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DailyTemperatures739.java) | Medium |
| [740. Delete and Earn](https://leetcode.com/problems/delete-and-earn/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DeleteAndEarn740.java) | Medium |
| [746. Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinCostClimbingStairs746.java) | Easy |
| [748. Shortest Completing Word](https://leetcode.com/problems/shortest-completing-word/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestCompletingWord748.java) | Medium |
| [750. Number Of Corner Rectangles](https://leetcode.com/problems/number-of-corner-rectangles/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfCornerRectangles750.java) | Medium |
| [752. Open the Lock](https://leetcode.com/problems/open-the-lock/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OpenTheLock752.java) | Medium |
| [759. Employee Free Time](https://leetcode.com/problems/employee-free-time/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/EmployeeFreeTime759.java) | Hard |
| [760. Find Anagram Mappings](https://leetcode.com/problems/find-anagram-mappings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindAnagramMappings760.java) | Easy |
| [763. Partition Labels](https://leetcode.com/problems/partition-labels/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PartitionLabels763.java) | Medium |
| [765. Couples Holding Hands](https://leetcode.com/problems/couples-holding-hands/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CouplesHoldingHands765.java) | Hard |
| [767. Reorganize String](https://leetcode.com/problems/reorganize-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ReorganizeString767.java) | Medium |
| [768. Max Chunks To Make Sorted II](https://leetcode.com/problems/max-chunks-to-make-sorted-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxChunksToMakeSortedII768.java) | Hard |
| [769. Max Chunks To Make Sorted](https://leetcode.com/problems/max-chunks-to-make-sorted/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxChunksToMakeSorted769.java) | Medium |
| [771. Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/JewelsAndStones771.java) | Easy |
| [777. Swap Adjacent in LR String](https://leetcode.com/problems/swap-adjacent-in-lr-string/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SwapAdjacentInLRString777.java) | Medium |
| [779. K-th Symbol in Grammar](https://leetcode.com/problems/k-th-symbol-in-grammar/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KthSymbolInGrammar779.java) | Medium |
| [785. Is Graph Bipartite?](https://leetcode.com/problems/is-graph-bipartite) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/IsGraphBipartite785.java) | Medium |
| [787. Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CheapestFlightsWithinKStops787.java) | Medium |
| [790. Domino and Tromino Tiling](https://leetcode.com/problems/domino-and-tromino-tiling/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DominoAndTrominoTiling790.java) | Medium |
| [792. Number of Matching Subsequences](https://leetcode.com/problems/number-of-matching-subsequences/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/NumberOfMatchingSubsequences792.java) | Medium |
| [797. All Paths From Source to Target](https://leetcode.com/problems/all-paths-from-source-to-target/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AllPathsFromSourceToTarget797.java) | Medium |
| [783. Minimum Distance Between BST Nodes](https://leetcode.com/problems/minimum-distance-between-bst-nodes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MinimumDistanceBetweenBSTNodes783.java) | Easy |
| [802. Find Eventual Safe States](https://leetcode.com/problems/find-eventual-safe-states/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindEventualSafeStates802.java) | Medium |
| [803. Bricks Falling When Hit](https://leetcode.com/problems/bricks-falling-when-hit/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BricksFallingWhenHit803.java) | Hard |
| [804. Unique Morse Code Words](https://leetcode.com/problems/unique-morse-code-words/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/UniqueMorseCodeWords804.java) | Easy |
| [807. Max Increase to Keep City Skyline](https://leetcode.com/problems/max-increase-to-keep-city-skyline/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaxIncreaseToKeepCitySkyline807.java) | Medium |
| [819. Most Common Word](https://leetcode.com/problems/most-common-word/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MostCommonWord819.java) | Easy |
| [826. Most Profit Assigning Work](https://leetcode.com/problems/most-profit-assigning-work/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MostProfitAssigningWork826.java) | Medium |
| [832. Flipping an Image](https://leetcode.com/problems/flipping-an-image/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FlippingAnImage832.java) | Easy |
| [836. Rectangle Overlap](https://leetcode.com/problems/rectangle-overlap/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RectangleOverlap863.java) | Easy |
| [841. Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KeysAndRooms841.java) | Medium |
| [842. Split Array into Fibonacci Sequence](https://leetcode.com/problems/split-array-into-fibonacci-sequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/SplitArrayIntoFibonacciSequence842.java) | Medium |
| [843. Guess the Word](https://leetcode.com/problems/guess-the-word/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/GuessTheWord843.java) | Hard |
| [844. Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BackspaceStringCompare844.java) | Easy |
| [845. Longest Mountain in Array](https://leetcode.com/problems/longest-mountain-in-array/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LongestMountainInArray845.java) | Medium |
| [846. Hand of Straights](https://leetcode.com/problems/hand-of-straights/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HandOfStraights846.java) | Medium |
| [849. Maximize Distance to Closest Person](https://leetcode.com/problems/maximize-distance-to-closest-person/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximizeDistanceToClosestPerson849.java) | Easy |
| [850. Rectangle Area II](https://leetcode.com/problems/rectangle-area-ii/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RectangleAreaII850.java) | Hard |
| [855. Exam Room](https://leetcode.com/problems/exam-room/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ExamRoom855.java) | Medium |
| [859. Buddy Strings](https://leetcode.com/problems/buddy-strings/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BuddyStrings859.java) | Easy |
| [860. Lemonade Change](https://leetcode.com/problems/lemonade-change/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LemonadeChange860.java) | Easy |
| [862. Shortest Subarray with Sum at Least K](https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestSubarrayWithSumAtLeastK862.java) | Hard |
| [863. All Nodes Distance K in Binary Tree](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AllNodesDistanceKInBinaryTree863.java) | Medium |
| [864. Shortest Path to Get All Keys](https://leetcode.com/problems/shortest-path-to-get-all-keys/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ShortestPathToGetAllKeys864.java) | Hard |
| [873. Length of Longest Fibonacci Subsequence](https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/LengthOfLongestFibonacciSubsequence873.java) | Medium |
| [875. Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KokoEatingBananas875.java) | Easy |
| [876. Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MiddleOfTheLinkedList876.java) | Easy |
| [877. Stone Game](https://leetcode.com/problems/stone-game/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/StoneGame877.java) | Medium |
| [879. Profitable Schemes](https://leetcode.com/problems/profitable-schemes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ProfitableSchemes879.java) | Hard |
| [884. Decoded String at Index](https://leetcode.com/problems/decoded-string-at-index/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/DecodedStringAtIndex884.java) | Medium |
| [885. Boats to Save People](https://leetcode.com/problems/boats-to-save-people/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/BoatsToSavePeople885.java) | Medium |
| [886. Possible Bipartition](https://leetcode.com/problems/possible-bipartition) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/PossibleBipartition886.java) | Medium |
| [887. Projection Area of 3D Shapes](https://leetcode.com/problems/projection-area-of-3d-shapes/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ProjectionAreaOf3DShapes887.java) | Easy |
| [890. Find and Replace Pattern](https://leetcode.com/problems/find-and-replace-pattern/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindAndReplacePattern890.java) | Medium 
| [895. Maximum Frequency Stack](https://leetcode.com/problems/maximum-frequency-stack/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/MaximumFrequencyStack895.java) | Hard |
| [Convert Binary Search Tree to Sorted Doubly Linked List](https://leetcode.com/explore/interview/card/facebook/5/round-1-phone-interview/283/) | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/ConvertBinarySearchTreeToSortedDoublyLinkedList.java) | - |
| HighestPopulationYear | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/HighestPopulationYear.java) | - |
| Insert into a Cyclic Sorted List | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/InsertIntoACyclicSortedList.java) | - |
| Robot Room Cleaner | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/RobotRoomCleaner.java) | - |
| AsyncJobMonitor | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/AsyncJobMonitor.java) | - |
| Bench | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Bench.java) | - |
| FindCenterOfMassInA2DArray | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/FindCenterOfMassInA2DArray.java) | - |
| OneEditDistance | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/OneEditDistance.java) | - |
| CollatzConjecture | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/CollatzConjecture.java) | - |
| Subsequence | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/Subsequence.java) | - |
| TreeToForestByErasingNodes | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/TreeToForestByErasingNodes.java) | - |
| KMP | [Solution](https://github.com/fluency03/leetcode-java/blob/master/src/KMP.java) | - |


================================================
FILE: src/.gitignore
================================================
*.class
.DS_store


================================================
FILE: src/AccountsMerge721.java
================================================
/**
 * Given a list accounts, each element accounts[i] is a list of strings, where
 * the first element accounts[i][0] is a name, and the rest of the elements are
 * emails representing emails of the account.
 *
 * Now, we would like to merge these accounts. Two accounts definitely belong
 * to the same person if there is some email that is common to both accounts.
 * Note that even if two accounts have the same name, they may belong to
 * different people as people could have the same name. A person can have any
 * number of accounts initially, but all of their accounts definitely have the
 * same name.
 *
 * After merging the accounts, return the accounts in the following format:
 * the first element of each account is the name, and the rest of the elements
 * are emails in sorted order. The accounts themselves can be returned in any
 * order.
 *
 * Example 1:
 * Input:
 * accounts = [["John", "johnsmith@mail.com", "john00@mail.com"], ["John", "johnnybravo@mail.com"], ["John", "johnsmith@mail.com", "john_newyork@mail.com"], ["Mary", "mary@mail.com"]]
 * Output: [["John", 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com'],  ["John", "johnnybravo@mail.com"], ["Mary", "mary@mail.com"]]
 *
 * Explanation:
 * The first and third John's are the same person as they have the common email "johnsmith@mail.com".
 * The second John and Mary are different people as none of their email addresses are used by other accounts.
 * We could return these lists in any order, for example the answer [['Mary', 'mary@mail.com'], ['John', 'johnnybravo@mail.com'],
 * ['John', 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com']] would still be accepted.
 *
 * Note:
 *
 * The length of accounts will be in the range [1, 1000].
 * The length of accounts[i] will be in the range [1, 10].
 * The length of accounts[i][j] will be in the range [1, 30].
 *
 */


public class AccountsMerge721 {
    public List<List<String>> accountsMerge(List<List<String>> accounts) {
        List<List<String>> res = new ArrayList<>();

        Map<String, Set<Set<String>>> map = new HashMap<>();

        for (List<String> acc: accounts) {
            String name = acc.get(0);
            if (!map.containsKey(name)) {
                Set<String> set = new HashSet<>(acc);
                set.remove(name);
                Set<Set<String>> setOfSet = new HashSet<>();
                setOfSet.add(set);
                map.put(name, setOfSet);
            } else {
                Set<Set<String>> toBeMerged = new HashSet<>();
                Set<Set<String>> setOfSet = map.get(name);
                Set<String> curr = new HashSet<>(acc);
                curr.remove(name);
                for (String email: curr) {
                    Set<String> found = null;
                    for (Set<String> e: setOfSet) {
                        if (e.contains(email)) {
                            found = e;
                            break;
                        }
                    }
                    if (found != null) {
                        setOfSet.remove(found);
                        toBeMerged.add(found);
                    }
                }
                for (Set<String> s: toBeMerged) {
                    curr.addAll(s);
                }
                setOfSet.add(curr);
            }
        }

        for (Map.Entry<String, Set<Set<String>>> en: map.entrySet()) {
            for (Set<String> es: en.getValue()) {
                List<String> list = new ArrayList<>(es);
                java.util.Collections.sort(list);
                list.add(0, en.getKey());
                res.add(list);
            }
        }

        return res;
    }


    /**
     * https://leetcode.com/problems/accounts-merge/solution/
     */
    int MAX_VAL = 10000;
    public List<List<String>> accountsMerge(List<List<String>> accounts) {

        Map<String, String> emailToName = new HashMap<>();
        Map<String, Integer> emailToId = new HashMap<>();

        DSU dsu = initDSU(accounts, emailToName, emailToId);

        Map<Integer, List<String>> res = new HashMap();
        for (String email: emailToName.keySet()) {
            int id = dsu.find(emailToId.get(email));
            res.computeIfAbsent(id, x -> new ArrayList()).add(email);
        }

        for (List<String> emails: res.values()) {
            Collections.sort(emails);
            emails.add(0, emailToName.get(emails.get(0)));
        }

        return new ArrayList(res.values());
    }


    private DSU initDSU(List<List<String>> accounts, Map<String, String> emailToName, Map<String, Integer> emailToId) {
        DSU dsu = new DSU(MAX_VAL+1);

        int id = 0;
        for (List<String> acc: accounts) {
            String name = acc.get(0);

            for (int i=1; i<acc.size(); i++) {
                String email = acc.get(i);
                emailToName.putIfAbsent(email, name);
                if (!emailToId.containsKey(email)) {
                    emailToId.put(email, id);
                    id++;
                }

                dsu.union(emailToId.get(acc.get(1)), emailToId.get(email));
            }
        }

        return dsu;
    }


    class DSU {
        int[] parent;

        public DSU(int size) {
            parent = new int[size];
            for (int i = 0; i < size; i++) parent[i] = i;
        }

        public int find(int x) {
            if (parent[x] != x) parent[x] = find(parent[x]);
            return parent[x];
        }

        public void union(int x, int y) {
            parent[find(x)] = find(y);
        }
    }


    /**
     * https://leetcode.com/problems/accounts-merge/discuss/109158/Java-Solution-(Build-graph-+-DFS-search)
     */
    public List<List<String>> accountsMerge3(List<List<String>> accounts) {
        Map<String, String> emailToName = new HashMap<>();
        Map<String, Set<String>> graph = initGraph(accounts, emailToName);

        Set<String> visited = new HashSet<>();
        List<List<String>> res = new LinkedList<>();

        for (String email: emailToName.keySet()) {
            List<String> list = new LinkedList<>();
            if (visited.add(email)) {
                dfs(graph, email, visited, list);
                Collections.sort(list);
                list.add(0, emailToName.get(email));
                res.add(list);
            }
        }

        return res;
    }

    private Map<String, Set<String>> initGraph(List<List<String>> accounts, Map<String, String> emailToName) {
        Map<String, Set<String>> graph = new HashMap<>();

        for (List<String> acc : accounts) {
            String name = acc.get(0);
            for (int i = 1; i < acc.size(); i++) {
                String email = acc.get(i);
                if (!graph.containsKey(acc.get(i))) {
                    graph.put(email, new HashSet<>());
                }

                emailToName.put(email, name);

                if (i == 1) continue;
                graph.get(email).add(acc.get(i-1));
                graph.get(acc.get(i-1)).add(email);
            }
        }
        return graph;
    }

    private void dfs(Map<String, Set<String>> graph, String email, Set<String> visited, List<String> list) {
        list.add(email);
        for (String l: graph.get(email)) {
            if (visited.add(l)) dfs(graph, l, visited, list);
        }
    }


}


================================================
FILE: src/AddBinary67.java
================================================
/**
 * Given two binary strings, return their sum (also a binary string).
 *
 * For example,
 * a = "11"
 * b = "1"
 * Return "100".
 */


public class AddBinary67 {
    public String addBinary(String a, String b) {
        return addBinary(a, b, a.length()-1, b.length()-1, 0) ;
    }

    private String addBinary(String a, String b, int i, int j, int carry) {
        if (i < 0 && j < 0) return (carry == 0) ? "" : "1";

        int sum = carry;
        if (i >= 0 && a.charAt(i) == '1') sum++;
        if (j >= 0 && b.charAt(j) == '1') sum++;

        return addBinary(a, b, i-1, j-1, (sum < 2) ? 0 : 1) + ((sum%2 == 0) ? "0" : "1");
    }



    public String addBinary2(String a, String b) {
        StringBuilder sb = new StringBuilder();
        addBinary(a, b, a.length()-1, b.length()-1, 0, sb) ;
        return sb.toString();
    }

    private void addBinary(String a, String b, int i, int j, int carry, StringBuilder sb) {
        if (i < 0 && j < 0) {
            sb.append((carry == 0) ? "" : "1");
            return;
        }

        int sum = carry;
        if (i >= 0 && a.charAt(i) == '1') sum++;
        if (j >= 0 && b.charAt(j) == '1') sum++;
        addBinary(a, b, i-1, j-1, (sum < 2) ? 0 : 1, sb);

        sb.append((sum%2 == 0) ? '0' : '1');
    }


    public String addBinary3(String a, String b) {
        StringBuilder sb = new StringBuilder();
        int carry = 0;
        int i = a.length()-1;
        int j = b.length()-1;
        while (i >= 0 && j >= 0) {
            int sum = carry;
            if (a.charAt(i) == '1') sum++;
            if (b.charAt(j) == '1') sum++;
            carry = (sum < 2) ? 0 : 1;
            sb.insert(0, (sum%2 == 0) ? '0' : '1');
            i--;
            j--;
        }

        while (i >= 0) {
            int sum = carry;
            if (a.charAt(i) == '1') sum++;
            carry = (sum < 2) ? 0 : 1;
            sb.insert(0, (sum%2 == 0) ? '0' : '1');
            i--;
        }

        while (j >= 0) {
            int sum = carry;
            if (b.charAt(j) == '1') sum++;
            carry = (sum < 2) ? 0 : 1;
            sb.insert(0, (sum%2 == 0) ? '0' : '1');
            j--;
        }

        if (carry == 1) sb.insert(0, '1');

        return sb.toString();
    }

    public String addBinary4(String a, String b) {
        char[] intToChar = new char[]{'0', '1'};
        int len = Math.max(a.length(), b.length());
        char[] res = new char[len + 1];
        int carry = 0;
        int s = len;
        int i = a.length() - 1;
        int j = b.length() - 1;
        while (i >= 0 && j >= 0) {
            int sum = charToInt(a.charAt(i--)) + charToInt(b.charAt(j--)) + carry;
            carry = sum >> 1;
            res[s--] = intToChar[sum & 1];
        }
        while (i >= 0) {
            int sum = charToInt(a.charAt(i--)) + carry;
            carry = sum >> 1;
            res[s--] = intToChar[sum & 1];
        }
        while (j >= 0) {
            int sum = charToInt(b.charAt(j--)) + carry;
            carry = sum >> 1;
            res[s--] = intToChar[sum & 1];
        }
        res[0] = intToChar[carry];
        return res[0] == '0' ? (new String(res)).substring(1) : new String(res);
    }
    
    private int charToInt(char c) {
        return c - '0';
    }

}


================================================
FILE: src/AddBoldTagInString616.java
================================================
/**
 * Given a string s and a list of strings dict, you need to add a closed pair
 * of bold tag <b> and </b> to wrap the substrings in s that exist in dict. If
 * two such substrings overlap, you need to wrap them together by only one pair
 * of closed bold tag. Also, if two substrings wrapped by bold tags are
 * consecutive, you need to combine them.
 * 
 * Example 1:
 * 
 * Input: 
 * s = "abcxyz123"
 * dict = ["abc","123"]
 * Output:
 * "<b>abc</b>xyz<b>123</b>"
 * 
 * Example 2:
 * Input: 
 * s = "aaabbcc"
 * dict = ["aaa","aab","bc"]
 * Output:
 * "<b>aaabbc</b>c"
 * 
 * Note:
 * The given dict won't contain duplicates, and its length won't exceed 100.
 * All the strings in input have length in range [1, 1000].
 */

public class AddBoldTagInString616 {
    public String addBoldTag(String s, String[] dict) {
        Trie trie = constructTrie(dict);        
        StringBuilder sb = new StringBuilder();
        int l = 0;
        int r = 0;
        char[] chars = s.toCharArray();
        for (int i=0; i<s.length(); i++) {
            int len = trie.search(chars, i);
            if (len == 0) {
                if (i >= r) {
                    if (r > l) {
                        sb.append("<b>");
                        sb.append(s.substring(l, r));
                        sb.append("</b>");
                    }
                    r = i + 1;
                    l = r;
                    sb.append(s.charAt(i));
                }
            } else {
                r = Math.max(r, i+len);
            }
        }

        if (r > l) {
            sb.append("<b>");
            sb.append(s.substring(l, r));
            sb.append("</b>");
        }

        return sb.toString();
    }
    
    private Trie constructTrie(String[] dict) {
        Trie res = new Trie();
        for (String word: dict) {
            res.addWord(word);
        }
        return res;
    }

    public String addBoldTag2(String s, String[] dict) {
        StringBuilder sb = new StringBuilder();
        int l = 0;
        int r = 0;
        for (int i=0; i<s.length(); i++) {
            int len = 0;
            for (String word: dict) {
                if (s.startsWith(word, i) && word.length() > len) {
                    len = word.length();
                }
            }
            if (len == 0) {
                if (i >= r) {
                    if (r > l) {
                        sb.append("<b>");
                        sb.append(s.substring(l, r));
                        sb.append("</b>");
                    }
                    r = i + 1;
                    l = r;
                    sb.append(s.charAt(i));
                }
            } else {
                r = Math.max(r, i+len);
            }
        }

        if (r > l) {
            sb.append("<b>");
            sb.append(s.substring(l, r));
            sb.append("</b>");
        }

        return sb.toString();
    }


    /**
     * https://leetcode.com/problems/add-bold-tag-in-string/discuss/104262/short-java-solution
     */
    public String addBoldTag3(String s, String[] dict) {
        int n = s.length();
        int[] mark = new int[n+1];
        for(String d : dict) {
            int i = -1;
            while((i = s.indexOf(d, i+1)) >= 0) {
                mark[i]++;
                mark[i + d.length()]--;
            }
        }
        StringBuilder sb = new StringBuilder();
        int sum = 0;
        for(int i = 0; i <= n; i++) {
            int cur = sum + mark[i];
            if (cur > 0 && sum == 0) sb.append("<b>");
            if (cur == 0 && sum > 0) sb.append("</b>");
            if (i == n) break;
            sb.append(s.charAt(i));
            sum = cur;
        }
        return sb.toString();
    }


    /**
     * https://leetcode.com/problems/add-bold-tag-in-string/discuss/104263/Java-solution-Same-as-Merge-Interval.
     */
    public String addBoldTag4(String s, String[] dict) {
        List<Interval> intervals = new ArrayList<>();
        for (String str : dict) {
            int index = -1;
            index = s.indexOf(str, index);
            while (index != -1) {
                intervals.add(new Interval(index, index + str.length()));
                index +=1;
                index = s.indexOf(str, index);
            }
        }
        intervals = merge(intervals);
        int prev = 0;
        StringBuilder sb = new StringBuilder();
        for (Interval interval : intervals) {
            sb.append(s.substring(prev, interval.start));
            sb.append("<b>");
            sb.append(s.substring(interval.start, interval.end));
            sb.append("</b>");
            prev = interval.end;
        }
        if (prev < s.length()) {
        	sb.append(s.substring(prev));
        }
        return sb.toString();
    }

    class Interval {
        int start, end;
        public Interval(int s, int e) {
            start = s;
            end = e;
        }
        
        public String toString() {
            return "[" + start + ", " + end + "]" ;
        }
    }

    public List<Interval> merge(List<Interval> intervals) {
        if (intervals == null || intervals.size() <= 1) {
            return intervals;
        }
        Collections.sort(intervals, new Comparator<Interval>(){
            public int compare(Interval a, Interval b) {
                return a.start - b.start;
            }
        });
        
        int start = intervals.get(0).start;
        int end = intervals.get(0).end;
        List<Interval> res = new ArrayList<>();
        for (Interval i : intervals) {
            if (i.start <= end) {
                end = Math.max(end, i.end);
            } else {
                res.add(new Interval(start, end));
                start = i.start;
                end = i.end;
            }
        }
        res.add(new Interval(start, end));
        return res;
    }


    /**
     * https://leetcode.com/problems/add-bold-tag-in-string/discuss/104262/short-java-solution
     */
    public String addBoldTag5(String s, String[] dict) {
        int n = s.length();
        int[] mark = new int[n+1];
        for(String d : dict) {
            int i = -1;
            while((i = s.indexOf(d, i+1)) >= 0) {
                mark[i]++;
                mark[i + d.length()]--;
            }
        }
        StringBuilder sb = new StringBuilder();
        int sum = 0;
        for(int i = 0; i <= n; i++) {
            int cur = sum + mark[i];
            if (cur > 0 && sum == 0) sb.append("<b>");
            if (cur == 0 && sum > 0) sb.append("</b>");
            if (i == n) break;
            sb.append(s.charAt(i));
            sum = cur;
        }
        return sb.toString();
    }


    public String addBoldTag6(String s, String[] dict) {
        if (s == null || s.length() == 0) return s;
        StringBuilder sb = new StringBuilder();
        int l = 0;
        int r = 0;
        int len = s.length();
        for (int i=0; i<len; i++) {
            for (String word: dict) {
                if (s.startsWith(word, i)) {
                    r = Math.max(r, i+word.length());
                }
            }
            if (i < r) continue;
            if (l != r) {
                sb.append("<b>").append(s.substring(l, r)).append("</b>");
            }
            sb.append(s.charAt(i));
            l = i+1;
            r = i+1;
        }
        if (l != r) {
            sb.append("<b>").append(s.substring(l, r)).append("</b>");
        }
        return sb.toString();
    }

}

class Trie {
    Map<Character, Trie> children = new HashMap<>();
    boolean end = false;

    public void addWord(String word) {
        addWord(word.toCharArray(), 0);
    }

    public void addWord(char[] chars, int i) {
        if (i == chars.length) {
            end = true;
            return;
        }
        char c = chars[i];
        if (children.containsKey(c)) {
            children.get(c).addWord(chars, i+1);
        } else {
            Trie child = new Trie();
            children.put(c, child);
            child.addWord(chars, i+1);
        }
    }

    public int search(char[] chars, int i) {
        return search(chars, i, i, 0);
    }

    private int search(char[] chars, int i, int x, int len) {
        if (x >= chars.length) return end ? x-i : len;
        char c = chars[x];
        if (!children.containsKey(c)) return end ? x-i : len;
        return children.get(c).search(chars, i, x+1, len);
    }

    // public void print() {
    //     for (char c: children.keySet()) {
    //         System.out.println(c);
    //         children.get(c).print();
    //     }
    // }
    
}


================================================
FILE: src/AddOneRowToTree623.java
================================================
/**
 * Given the root of a binary tree, then value v and depth d, you need to add a
 * row of nodes with value v at the given depth d. The root node is at depth 1.
 *
 * The adding rule is: given a positive integer depth d, for each NOT null tree
 * nodes N in depth d-1, create two tree nodes with value v as N's left subtree
 * root and right subtree root. And N's original left subtree should be the left
 * subtree of the new left subtree root, its original right subtree should be
 * the right subtree of the new right subtree root. If depth d is 1 that means
 * there is no depth d-1 at all, then create a tree node with value v as the
 * new root of the whole original tree, and the original tree is the new root's
 * left subtree.
 *
 * Example 1:
 * Input:
 * A binary tree as following:
 *        4
 *      /   \
 *     2     6
 *    / \   /
 *   3   1 5
 *
 * v = 1
 *
 * d = 2
 *
 * Output:
 *        4
 *       / \
 *      1   1
 *     /     \
 *    2       6
 *   / \     /
 *  3   1   5
 *
 * ---------------------------------------------------
 *
 * Example 2:
 * Input:
 * A binary tree as following:
 *       4
 *      /
 *     2
 *    / \
 *   3   1
 *
 * v = 1
 *
 * d = 3
 *
 * Output:
 *       4
 *      /
 *     2
 *    / \
 *   1   1
 *  /     \
 * 3       1
 *
 *
 * Note:
 * The given d is in range [1, maximum depth of the given tree + 1].
 * The given binary tree has at least one tree node.
 */


/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */


public class AddOneRowToTree623 {
    public TreeNode addOneRow(TreeNode root, int v, int d) {
        if (d == 1) {
            TreeNode newNode = new TreeNode(v);
            newNode.left = root;
            return newNode;
        }

        insert(root, v, d);

        return root;
    }

    private void insert(TreeNode root, int v, int d) {
        if (root == null) {
            return;
        }
        if (d == 2) {
            TreeNode t = root.left;
            root.left = new TreeNode(v);
            root.left.left = t;
            t = root.right;
            root.right = new TreeNode(v);
            root.right.right = t;
        } else {
            addOneRow(root.left, v, d-1);
            addOneRow(root.right, v, d-1);
        }
    }

    /**
     * https://discuss.leetcode.com/topic/92964/java-three-methods-one-bfs-and-two-dfs
     */
    public TreeNode addOneRow3(TreeNode root, int v, int d) {
        if (d == 1) {
            TreeNode newroot = new TreeNode(v);
            newroot.left = root;
            return newroot;
        }
        LinkedList<TreeNode> queue = new LinkedList<>();
        queue.add(root);
        for (int i = 0; i < d-2; i++) {
            int size = queue.size();
            for (int j = 0; j < size; j++) {
                TreeNode t = queue.poll();
                if (t.left != null) queue.add(t.left);
                if (t.right != null) queue.add(t.right);
            }
        }
        while (!queue.isEmpty()) {
            TreeNode t = queue.poll();
            TreeNode tmp = t.left;
            t.left = new TreeNode(v);
            t.left.left = tmp;
            tmp = t.right;
            t.right = new TreeNode(v);
            t.right.right = tmp;
        }
        return root;
    }




}


================================================
FILE: src/AddStrings415.java
================================================
/**
 * Given two non-negative integers num1 and num2 represented as string, return
 * the sum of num1 and num2.
 * 
 * Note:
 * The length of both num1 and num2 is < 5100.
 * Both num1 and num2 contains only digits 0-9.
 * Both num1 and num2 does not contain any leading zero.
 * You must not use any built-in BigInteger library or convert the inputs to
 * integer directly.
 */

public class AddStrings415 {
    public String addStrings(String num1, String num2) {
        int carry = 0;
        char[] chars1 = num1.toCharArray();
        char[] chars2 = num2.toCharArray();
        int len1 = num1.length();
        int len2 = num2.length();
        int len = Math.max(len1, len2);
        StringBuilder sb = new StringBuilder();
        int i = 0;
        while (i < len) {
            int a = (len1 - i - 1 < 0) ? 0 : chars1[len1 - i - 1] - '0';
            int b = (len2 - i - 1 < 0) ? 0 : chars2[len2 - i - 1] - '0';
            int sum = a + b + carry;
            sb.insert(0, sum % 10);
            carry = sum / 10;
            i++;
        }
        if (carry > 0) sb.insert(0, Integer.toString(carry)); 
        return sb.toString();
    }


    /**
     * https://leetcode.com/problems/add-strings/
     */
    public String addStrings2(String num1, String num2) {
        char[] temp = new char[Math.max(num1.length(), num2.length())];
        int i = num1.length() - 1, j = num2.length() - 1;
        int index = temp.length - 1;
        int carry = 0;
        while (i >= 0 || j >= 0) {
            int a = i >= 0 ? num1.charAt(i--) - '0' : 0;
            int b = j >= 0 ? num2.charAt(j--) - '0' : 0;
            int sum = a + b + carry;
            temp[index--] = (char)(sum % 10 + '0');
            carry = sum / 10;
        }
        
        return carry == 0 ? new String(temp) : "1" + new String(temp);
    }

}


================================================
FILE: src/AddTwoNumbers2.java
================================================
/**
 * You are given two non-empty linked lists representing two non-negative
 * integers. The digits are stored in reverse order and each of their nodes
 * contain a single digit. Add the two numbers and return it as a linked list.
 *
 * You may assume the two numbers do not contain any leading zero, except the
 * number 0 itself.
 *
 * Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
 * Output: 7 -> 0 -> 8
 */


public class AddTwoNumbers2 {
    public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
        ListNode dummy = new ListNode(0);
        ListNode p = dummy;
        int carry = 0;
        while (l1 != null || l2 != null) {
            int a = l1 == null ? 0 : l1.val;
            int b = l2 == null ? 0 : l2.val;
            int sum = a + b + carry;
            ListNode n = new ListNode(sum%10);
            p.next = n;
            p = p.next;
            carry = sum/10;
            l1 = l1 == null ? null : l1.next;
            l2 = l2 == null ? null : l2.next;
        }

        if (carry != 0) p.next = new ListNode(carry);

        return dummy.next;
    }

    public ListNode addTwoNumbers2(ListNode l1, ListNode l2) {
        ListNode dummy = new ListNode(0);
        ListNode p = dummy;
        int carry = 0;
        while (l1 != null && l2 != null) {
            int sum = l1.val + l2.val + carry;
            p.next = new ListNode(sum % 10);
            p = p.next;
            carry = sum / 10;
            l1 = l1.next;
            l2 = l2.next;
        }
        
        while (l1 != null) {
            int sum = l1.val + carry;
            p.next = new ListNode(sum % 10);
            p = p.next;
            carry = sum / 10;
            l1 = l1.next;
        }
        while (l2 != null) {
            int sum = l2.val + carry;
            p.next = new ListNode(sum % 10);
            p = p.next;
            carry = sum / 10;
            l2 = l2.next;
        }
        if (carry != 0) p.next =  new ListNode(carry);
        
        return dummy.next;
    }

}


================================================
FILE: src/AddTwoNumbersII445.java
================================================
/**
 * You are given two non-empty linked lists representing two non-negative
 * integers. The most significant digit comes first and each of their nodes
 * contain a single digit. Add the two numbers and return it as a linked list.
 * 
 * You may assume the two numbers do not contain any leading zero, except the
 * number 0 itself.
 * 
 * Follow up:
 * What if you cannot modify the input lists? In other words, reversing the
 * lists is not allowed.
 * 
 * Example:
 * 
 * Input: (7 -> 2 -> 4 -> 3) + (5 -> 6 -> 4)
 * Output: 7 -> 8 -> 0 -> 7
 */

/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode(int x) { val = x; }
 * }
 */

public class AddTwoNumbersII445 {
    public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
        Stack<Integer> s1 = new Stack<>();
        Stack<Integer> s2 = new Stack<>();
        
        while (l1 != null && l2 != null) {
            s1.push(l1.val);
            l1 = l1.next;
            s2.push(l2.val);
            l2 = l2.next;
        }
        while (l1 != null) {
            s1.push(l1.val);
            l1 = l1.next;
        }
        while (l2 != null) {
            s2.push(l2.val);
            l2 = l2.next;
        }

        ListNode dummy = new ListNode(0);
        ListNode p = dummy;
        int carry = 0;
        while (!s1.isEmpty() && !s2.isEmpty()) {
            int sum = s1.pop() + s2.pop() + carry;
            ListNode curr = new ListNode(sum % 10);
            curr.next = p.next;
            p.next = curr;
            carry = sum / 10;
        }
        while (!s1.isEmpty()) {
            int sum = s1.pop() + carry;
            ListNode curr = new ListNode(sum % 10);
            curr.next = p.next;
            p.next = curr;
            carry = sum / 10;
        }
        while (!s2.isEmpty()) {
            int sum = s2.pop() + carry;
            ListNode curr = new ListNode(sum % 10);
            curr.next = p.next;
            p.next = curr;
            carry = sum / 10;
        }
        if (carry != 0) {
            ListNode curr = new ListNode(carry);
            curr.next = p.next;
            p.next = curr;
        }

        return dummy.next;
    }


    public ListNode addTwoNumbers2(ListNode l1, ListNode l2) {
      ListNode ll1 = reverseList(l1);
      ListNode ll2 = reverseList(l2);

      return reverseList(addTwoNumbers0(ll1, ll2));
    } 

    public ListNode addTwoNumbers0(ListNode l1, ListNode l2) {
        ListNode dummy = new ListNode(0);
        ListNode p = dummy;
        int carry = 0;
        while (l1 != null || l2 != null) {
            int a = l1 == null ? 0 : l1.val;
            int b = l2 == null ? 0 : l2.val;
            int sum = a + b + carry;
            ListNode n = new ListNode(sum%10);
            p.next = n;
            p = p.next;
            carry = sum/10;
            l1 = l1 == null ? null : l1.next;
            l2 = l2 == null ? null : l2.next;
        }

        if (carry != 0) p.next = new ListNode(carry);

        return dummy.next;
    }

    public ListNode reverseList(ListNode head) {
        if (head == null || head.next == null) return head;

        ListNode dummy = new ListNode(0);
        ListNode tail = null;

        while (head != null) {
            ListNode t = head;
            head = head.next;
            tail = dummy.next;
            dummy.next = t;
            dummy.next.next = tail;
        }

        return dummy.next;
    }

}


================================================
FILE: src/AlienDictionary269.java
================================================
/**
 * There is a new alien language which uses the latin alphabet. However, the
 * order among letters are unknown to you. You receive a list of non-empty words
 * from the dictionary, where words are sorted lexicographically by the rules of
 * this new language. Derive the order of letters in this language.
 * 
 * Example 1:
 * 
 * Input:
 * [
 *   "wrt",
 *   "wrf",
 *   "er",
 *   "ett",
 *   "rftt"
 * ]
 * 
 * Output: "wertf"
 * Example 2:
 * 
 * Input:
 * [
 *   "z",
 *   "x"
 * ]
 * 
 * Output: "zx"
 * Example 3:
 * 
 * Input:
 * [
 *   "z",
 *   "x",
 *   "z"
 * ] 
 * 
 * Output: "" 
 * 
 * Explanation: The order is invalid, so return "".
 * 
 * Note:
 * 
 * You may assume all letters are in lowercase.
 * You may assume that if a is a prefix of b, then a must appear before b in
 * the given dictionary.
 * If the order is invalid, return an empty string.
 * There may be multiple valid order of letters, return any one of them is fine.
 */


public class AlienDictionary269 {
    
    private Set<Character> vertices = new HashSet<>();
    private Set<Character>[] graph = new Set[26];

    /**
     * DFS based topological sort
     */
    public String alienOrder(String[] words) {
        initMap(words);
        updateOrderMap(words);
        
        StringBuilder sb = new StringBuilder();
        boolean[] visited = new boolean[26];
        for (char key: vertices) {
            if (!visited[key - 'a']) {
                if (!helper(key, new HashSet<Character>(), visited, sb)) return "";
            }
        }

        return sb.reverse().toString();
    }

    private boolean helper(Character key, Set<Character> path, boolean[] visited, StringBuilder sb) {
        visited[key - 'a'] = true;
        path.add(key);
        for (Character c: graph[key - 'a']) {
            if (path.contains(c)) return false;
            if (!visited[c - 'a']) {
                if (!helper(c, path, visited, sb)) return false;
            }
        }
        sb.append(key);
        path.remove(key);
        return true;
    }
    
    private void initMap(String[] words) {    
        for (String word: words) {
            for (char c: word.toCharArray()) {
                if (!vertices.contains(c)) {
                    vertices.add(c);
                    graph[c - 'a'] = new HashSet<Character>();
                }
            }
        }
    }

    private void updateOn(String word1, String word2) {
        int len = Math.min(word1.length(), word2.length());
        for (int i=0; i<len; i++) {
            if (word1.charAt(i) != word2.charAt(i)) {
                graph[word1.charAt(i) - 'a'].add(word2.charAt(i));
                return;
            }
        }
    }

    private void updateOrderMap(String[] dicts) {
        initMap(dicts);
        for (int i=0; i<dicts.length-1; i++) {
            updateOn(dicts[i], dicts[i+1]);
        }
    }


    /**
     * Kahn’s algorithm for Topological Sorting
     */
    private int[] incomming = new int[26];
    public String alienOrder2(String[] words) {
        initMap(words);
        updateOrderMap(words);

        for (Character v: vertices) {
            Set<Character> adjs = graph[v - 'a'];
            if (adjs != null) {
                for (Character c: adjs) {
                    incomming[c - 'a']++;
                }
            }
        }
        
        Queue<Character> q = new LinkedList<>();
        for (Character c: vertices) {
            if (incomming[c - 'a'] == 0) {
                q.add(c);
            }
        }

        int visited = 0;
        StringBuilder sb = new StringBuilder();
        while (!q.isEmpty()) {
            char c = q.remove();
            sb.append(c);
            for (Character next: graph[c - 'a']) {
                incomming[next - 'a']--;
                if (incomming[next - 'a'] == 0) {
                    q.add(next);
                }
            }
            visited++;
        }
        if (visited != vertices.size()) return "";
        
        return sb.toString();
    }


    /**
     * https://leetcode.com/problems/alien-dictionary/discuss/70115/3ms-Clean-Java-Solution-(DFS)
     */
    private final int N = 26;
    public String alienOrder3(String[] words) {
        boolean[][] adj = new boolean[N][N];
        int[] visited = new int[N];
        buildGraph(words, adj, visited);
    
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < N; i++) {
            if(visited[i] == 0) {                 // unvisited
                if(!dfs(adj, visited, sb, i)) return "";
            }
        }
        return sb.reverse().toString();
    }
    
    public boolean dfs(boolean[][] adj, int[] visited, StringBuilder sb, int i) {
        visited[i] = 1;                            // 1 = visiting
        for(int j = 0; j < N; j++) {
            if(adj[i][j]) {                        // connected
                if(visited[j] == 1) return false;  // 1 => 1, cycle   
                if(visited[j] == 0) {              // 0 = unvisited
                    if(!dfs(adj, visited, sb, j)) return false;
                }
            }
        }
        visited[i] = 2;                           // 2 = visited
        sb.append((char) (i + 'a'));
        return true;
    }
    
    public void buildGraph(String[] words, boolean[][] adj, int[] visited) {
        Arrays.fill(visited, -1);                 // -1 = not even existed
        for(int i = 0; i < words.length; i++) {
            for(char c : words[i].toCharArray()) visited[c - 'a'] = 0;
            if(i > 0) {
                String w1 = words[i - 1], w2 = words[i];
                int len = Math.min(w1.length(), w2.length());
                for(int j = 0; j < len; j++) {
                    char c1 = w1.charAt(j), c2 = w2.charAt(j);
                    if(c1 != c2) {
                        adj[c1 - 'a'][c2 - 'a'] = true;
                        break;
                    }
                }
            }
        }
    }

}


================================================
FILE: src/AllNodesDistanceKInBinaryTree863.java
================================================
/**
 * We are given a binary tree (with root node root), a target node, and an
 * integer value K.
 * 
 * Return a list of the values of all nodes that have a distance K from the
 * target node.  The answer can be returned in any order.
 * 
 * Example 1:
 * Input: root = [3,5,1,6,2,0,8,null,null,7,4], target = 5, K = 2
 * Output: [7,4,1]
 * 
 * Explanation: 
 * The nodes that are a distance 2 from the target node (with value 5)
 * have values 7, 4, and 1.
 * 
 * https://s3-lc-upload.s3.amazonaws.com/uploads/2018/06/28/sketch0.png
 * 
 * Note that the inputs "root" and "target" are actually TreeNodes.
 * The descriptions of the inputs above are just serializations of these objects.
 * 
 * Note:
 * The given tree is non-empty.
 * Each node in the tree has unique values 0 <= node.val <= 500.
 * The target node is a node in the tree.
 * 0 <= K <= 1000.
 */

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */

public class AllNodesDistanceKInBinaryTree863 {
    public List<Integer> distanceK(TreeNode root, TreeNode target, int K) {
        List<Integer> res = new ArrayList<>();
        if (root == null) return res;
        if (K == 0) {
            res.add(target.val);
            return res;
        }
        distanceToRoot(root, target, K, res, 0);
        return res;
    }

    private int distanceToRoot(TreeNode root, TreeNode target, int K, List<Integer> res, int level) {
        if (root == null) return -1;
        if (root.val == target.val) {
            distanceKChildren(root, K, res);
            return level;
        }
        int leftFlag = distanceToRoot(root.left, target, K, res, level + 1);
        if (leftFlag != -1) {
            if (leftFlag - level == K) {
                res.add(root.val);
            } else if (leftFlag - level < K) {
                distanceKChildren(root.right, K - (leftFlag - level) - 1, res);
            }
        }
        int rightFlag = distanceToRoot(root.right, target, K, res, level + 1);
        if (rightFlag != -1) {
            if (rightFlag - level == K) {
                res.add(root.val);
            } else if (rightFlag - level < K) {
                distanceKChildren(root.left, K - (rightFlag - level) - 1, res);
            }
        }
        return leftFlag != -1 ? leftFlag : rightFlag;
    }

    private void distanceKChildren(TreeNode root, int K, List<Integer> res) {
        if (root == null) return;
        Queue<TreeNode> q = new LinkedList<>();
        q.add(root);
        int i = 0;
        while (!q.isEmpty() && i < K) {
            int size = q.size();
            for (int j=0; j<size; j++) {
                TreeNode curr = q.poll();
                if (curr.left != null) q.add(curr.left);
                if (curr.right != null) q.add(curr.right);
            }
            i++;
        }
        while (!q.isEmpty()) {
            res.add(q.poll().val);
        }
    }


    /**
     * https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/solution/
     */
    Map<TreeNode, TreeNode> parent;
    public List<Integer> distanceK2(TreeNode root, TreeNode target, int K) {
        parent = new HashMap();
        dfs(root, null);

        Queue<TreeNode> queue = new LinkedList();
        queue.add(null);
        queue.add(target);

        Set<TreeNode> seen = new HashSet();
        seen.add(target);
        seen.add(null);

        int dist = 0;
        while (!queue.isEmpty()) {
            TreeNode node = queue.poll();
            if (node == null) {
                if (dist == K) {
                    List<Integer> ans = new ArrayList();
                    for (TreeNode n: queue)
                        ans.add(n.val);
                    return ans;
                }
                queue.offer(null);
                dist++;
            } else {
                if (!seen.contains(node.left)) {
                    seen.add(node.left);
                    queue.offer(node.left);
                }
                if (!seen.contains(node.right)) {
                    seen.add(node.right);
                    queue.offer(node.right);
                }
                TreeNode par = parent.get(node);
                if (!seen.contains(par)) {
                    seen.add(par);
                    queue.offer(par);
                }
            }
        }

        return new ArrayList<Integer>();
    }

    public void dfs(TreeNode node, TreeNode par) {
        if (node != null) {
            parent.put(node, par);
            dfs(node.left, node);
            dfs(node.right, node);
        }
    }


    /**
     * https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/solution/
     */
    List<Integer> ans;
    TreeNode target;
    int K;
    public List<Integer> distanceK3(TreeNode root, TreeNode target, int K) {
        ans = new LinkedList();
        this.target = target;
        this.K = K;
        dfs(root);
        return ans;
    }

    // Return distance from node to target if exists, else -1
    public int dfs(TreeNode node) {
        if (node == null)
            return -1;
        else if (node == target) {
            subtree_add(node, 0);
            return 1;
        } else {
            int L = dfs(node.left), R = dfs(node.right);
            if (L != -1) {
                if (L == K) ans.add(node.val);
                subtree_add(node.right, L + 1);
                return L + 1;
            } else if (R != -1) {
                if (R == K) ans.add(node.val);
                subtree_add(node.left, R + 1);
                return R + 1;
            } else {
                return -1;
            }
        }
    }

    // Add all nodes 'K - dist' from the node to answer.
    public void subtree_add(TreeNode node, int dist) {
        if (node == null) return;
        if (dist == K)
            ans.add(node.val);
        else {
            subtree_add(node.left, dist + 1);
            subtree_add(node.right, dist + 1);
        }
    }


    Map<TreeNode, Integer> map = new HashMap<>();
    public List<Integer> distanceK4(TreeNode root, TreeNode target, int K) {
        List<Integer> res = new LinkedList<>();
        find(root, target, K);
        dfs(root, target, K, map.get(root), res);
        return res;
    }

    // find target node first and store the distance in that path that we could use it later directly
    private int find(TreeNode root, TreeNode target, int K) {
        if (root == null) return -1;
        if (root == target) {
            map.put(root, 0);
            return 0;
        }
        int left = find(root.left, target, K);
        if (left >= 0) {
            map.put(root, left + 1);
            return left + 1;
        }
        int right = find(root.right, target, K);
        if (right >= 0) {
            map.put(root, right + 1);
            return right + 1;
        }
        return -1;
    }

    private void dfs(TreeNode root, TreeNode target, int K, int length, List<Integer> res) {
        if (root == null) return;
        if (map.containsKey(root)) length = map.get(root);
        if (length == K) res.add(root.val);
        dfs(root.left, target, K, length + 1, res);
        dfs(root.right, target, K, length + 1, res);
    }

}


================================================
FILE: src/AllOOneDataStructure432.java
================================================
/**
 * Implement a data structure supporting the following operations:
 * 
 * Inc(Key) - Inserts a new key with value 1. Or increments an existing key
 * by 1. Key is guaranteed to be a non-empty string.
 * Dec(Key) - If Key's value is 1, remove it from the data structure. Otherwise
 * decrements an existing key by 1. If the key does not exist, this function
 * does nothing. Key is guaranteed to be a non-empty string.
 * GetMaxKey() - Returns one of the keys with maximal value. If no element
 * exists, return an empty string "".
 * GetMinKey() - Returns one of the keys with minimal value. If no element
 * exists, return an empty string "".
 * 
 * Challenge: Perform all these in O(1) time complexity.
 */


public class AllOOneDataStructure432 {

    class AllOne {
        private Map<String, KeyNode> keyMap;
        private Map<Integer, FreqNode> freqMap;
        private FreqNode head;

        /** Initialize your data structure here. */
        public AllOne() {
            this.keyMap = new HashMap<>();
            this.freqMap = new HashMap<>();
            this.head = new FreqNode();
            this.head.next = this.head;
            this.head.prev = this.head;
        }

        /** Inserts a new key <Key> with value 1. Or increments an existing key by 1. */
        public void inc(String key) {
            KeyNode node = keyMap.get(key);
            if (node == null) {
                node = new KeyNode(key);
                FreqNode freqNode = freqMap.get(node.freq);
                if (freqNode == null) {
                    freqNode = new FreqNode(node.freq);
                    this.freqMap.put(freqNode.freq, freqNode);
                    addAfter(this.head, freqNode);
                }
                addAfter(freqNode.keyHead, node);
                this.keyMap.put(node.key, node);
            } else {
                dislink(node);
                FreqNode preFreqNode = freqMap.get(node.freq);
                node.freq++;
                FreqNode nextFreqNode = freqMap.get(node.freq);
                if (nextFreqNode == null) {
                    nextFreqNode = new FreqNode(node.freq);
                    this.freqMap.put(nextFreqNode.freq, nextFreqNode);
                    addAfter(preFreqNode, nextFreqNode);
                }
                addAfter(nextFreqNode.keyHead, node);
                if (isEmpty(preFreqNode.keyHead)) {
                    dislink(preFreqNode);
                    this.freqMap.remove(preFreqNode.freq);
                }
            }
        }

        private void dislink(KeyNode node) {
            node.next.prev = node.prev;
            node.prev.next = node.next;
        }

        private void dislink(FreqNode node) {
            node.next.prev = node.prev;
            node.prev.next = node.next;
        }

        private void addAfter(KeyNode node, KeyNode newNode) {
            newNode.next = node.next;
            newNode.prev = node;
            node.next.prev = newNode;
            node.next = newNode;
        }

        private void addAfter(FreqNode node, FreqNode newNode) {
            newNode.next = node.next;
            newNode.prev = node;
            node.next.prev = newNode;
            node.next = newNode;
        }

        /** Decrements an existing key by 1. If Key's value is 1, remove it from the data structure. */
        public void dec(String key) {
            KeyNode node = keyMap.get(key);
            if (node == null) return;

            dislink(node);
            FreqNode preFreqNode = freqMap.get(node.freq);
            node.freq--;
            if (node.freq > 0) {
                FreqNode nextFreqNode = freqMap.get(node.freq);
                if (nextFreqNode == null) {
                    nextFreqNode = new FreqNode(node.freq);
                    this.freqMap.put(nextFreqNode.freq, nextFreqNode);
                    addBefore(preFreqNode, nextFreqNode);
                }
                addAfter(nextFreqNode.keyHead, node);
            } else {
                this.keyMap.remove(node.key);
            }
            if (isEmpty(preFreqNode.keyHead)) {
                dislink(preFreqNode);
                this.freqMap.remove(preFreqNode.freq);
            }
        }

        private void addBefore(FreqNode node, FreqNode newNode) {
            newNode.next = node;
            newNode.prev = node.prev;
            node.prev.next = newNode;
            node.prev = newNode;
        }

        /** Returns one of the keys with maximal value. */
        public String getMaxKey() {
            if (isEmpty()) return "";
            return this.head.prev.keyHead.next.key;
        }

        /** Returns one of the keys with Minimal value. */
        public String getMinKey() {
            if (isEmpty()) return "";
            return this.head.next.keyHead.next.key;
        }

        private boolean isEmpty() {
            return isEmpty(this.head);
        }

        private boolean isEmpty(KeyNode node) {
            return node.next == node;
        }

        private boolean isEmpty(FreqNode node) {
            return node.next == node;
        }

        class KeyNode {
            KeyNode prev;
            KeyNode next;
            String key;
            int freq;
            KeyNode() {
            }
            KeyNode(String key) {
                this.key = key;
                this.freq = 1;
            }
            KeyNode(String key, int freq) {
                this.key = key;
                this.freq = freq;
            }
        }

        class FreqNode {
            FreqNode prev;
            FreqNode next;
            int freq;
            KeyNode keyHead;
            FreqNode () {
            }
            FreqNode (int freq) {
                this.freq = freq;
                this.keyHead = new KeyNode();
                this.keyHead.next = this.keyHead;
                this.keyHead.prev = this.keyHead;
            }
        }
    }

/**
 * Your AllOne object will be instantiated and called as such:
 * AllOne obj = new AllOne();
 * obj.inc(key);
 * obj.dec(key);
 * String param_3 = obj.getMaxKey();
 * String param_4 = obj.getMinKey();
 */

}



================================================
FILE: src/AllPathsFromSourceToTarget797.java
================================================
/**
 * Given a directed, acyclic graph of N nodes.  Find all possible paths from
 * node 0 to node N-1, and return them in any order.
 * 
 * The graph is given as follows:  the nodes are0, 1, ..., graph.length - 1.
 * graph[i] is a list of all nodes j for which the edge (i, j) exists.
 * 
 * Example:
 * Input: [[1,2], [3], [3], []] 
 * Output: [[0,1,3],[0,2,3]] 
 * Explanation: The graph looks like this:
 * 0--->1
 * |    |
 * v    v
 * 2--->3
 * There are two paths: 0 -> 1 -> 3 and 0 -> 2 -> 3.
 * 
 * Note:
 * The number of nodes in the graph will be in the range [2, 15].
 * You can print different paths in any order, but you should keep the order
 * of nodes inside one path.
 */

public class AllPathsFromSourceToTarget797 {
    public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
        List<List<Integer>> res = new ArrayList<>();
        if (graph == null || graph.length == 0) return res;
        int N = graph.length;
        backtrace(graph, 0, N-1, new ArrayList<>(), res, N);
        return res;
    }

    private void backtrace(int[][] graph, int current, int dest, List<Integer> path, List<List<Integer>> res, int N) {
        if (current == dest) {
            path.add(current);
            res.add(new ArrayList<>(path));
            path.remove(path.size() - 1);
            return;
        }
        
        path.add(current);
        for (int child: graph[current]) {
            backtrace(graph, child, N-1, path, res, N);
        }
        path.remove(path.size() - 1);
    }


    public List<List<Integer>> allPathsSourceTarget2(int[][] graph) {
        List<List<Integer>> res = new ArrayList<>();
        if (graph == null || graph.length == 0) return res;
        int N = graph.length;
        List<Integer> path = new ArrayList<>();
        path.add(0);
        backtrace2(graph, 0, N-1, path, res, N);
        return res;
    }

    private void backtrace2(int[][] graph, int current, int dest, List<Integer> path, List<List<Integer>> res, int N) {
        if (current == dest) {
            res.add(new ArrayList<>(path));
            return;
        }

        for (int child: graph[current]) {
            path.add(child);
            backtrace2(graph, child, N-1, path, res, N);
            path.remove(path.size() - 1);
        }
    }

}


================================================
FILE: src/AndroidUnlockPatterns351.java
================================================
/**
 * Given an Android 3x3 key lock screen and two integers m and n, where
 * 1 ≤ m ≤ n ≤ 9, count the total number of unlock patterns of the Android
 * lock screen, which consist of minimum of m keys and maximum n keys.
 * 
 * Rules for a valid pattern:
 * - Each pattern must connect at least m keys and at most n keys.
 * - All the keys must be distinct.
 * - If the line connecting two consecutive keys in the pattern passes through
 * any other keys, the other keys must have previously selected in the pattern.
 * No jumps through non selected key is allowed.
 * - The order of keys used matters.
 * 
 * Explanation:
 * | 1 | 2 | 3 |
 * | 4 | 5 | 6 |
 * | 7 | 8 | 9 |
 * Invalid move: 4 - 1 - 3 - 6 
 * Line 1 - 3 passes through key 2 which had not been selected in the pattern.
 * 
 * Invalid move: 4 - 1 - 9 - 2
 * Line 1 - 9 passes through key 5 which had not been selected in the pattern.
 * 
 * Valid move: 2 - 4 - 1 - 3 - 6
 * Line 1 - 3 is valid because it passes through key 2, which had been selected in the pattern
 * 
 * Valid move: 6 - 5 - 4 - 1 - 9 - 2
 * Line 1 - 9 is valid because it passes through key 5, which had been selected in the pattern.
 * 
 * Example:
 * Given m = 1, n = 1, return 9.
 */

public class AndroidUnlockPatterns351 {
    private int[][] points = new int[][]{{0,0}, {0,1}, {0,2}, {1,0}, {1,1}, {1,2}, {2,0}, {2,1}, {2,2}};
    
    public int numberOfPatterns(int m, int n) {
        boolean[][] visited = new boolean[3][3];
        // corner
        int[] res0 = new int[1];
        dfs(visited, 0, 0, m, n, 1, res0);
    
        // edge
        int[] res1 = new int[1];
        dfs(visited, 0, 1, m, n, 1, res1);
    
        // center
        int[] res2 = new int[1];
        dfs(visited, 1, 1, m, n, 1, res2);
    
        return res0[0] * 4 + res1[0] * 4 + res2[0];
    }
    
    
    private void dfs(boolean[][] visited, int i, int j, int m, int n, int level, int[] res) {
        if (level > n) return;
        if (level >= m && level <=n) res[0]++;
        visited[i][j] = true;
        for (int[] p: points) {
            if (!visited[p[0]][p[1]] && canGo(i, j, p[0], p[1], visited)) {
                dfs(visited, p[0], p[1], m, n, level+1, res);
            }
        }
        visited[i][j] = false;
    }
    
    private boolean canGo(int i1, int j1, int i2, int j2, boolean[][] visited) {
        if (!isJumping(i1, j1, i2, j2)) return true;
        return visited[(i1+i2)/2][(j1+j2)/2];
    }
    
    private boolean isJumping(int i1, int j1, int i2, int j2) {
        return (i1 == i2 && Math.abs(j1-j2) == 2) ||
                (j1 == j2 && Math.abs(i1-i2) == 2) ||
                (Math.abs(i1-i2) == 2 && Math.abs(j1-j2) == 2);
    }


    public int numberOfPatterns2(int m, int n) {
        // Skip array represents number to skip between two pairs
        int skip[][] = new int[10][10];
        skip[1][3] = skip[3][1] = 2;
        skip[1][7] = skip[7][1] = 4;
        skip[3][9] = skip[9][3] = 6;
        skip[7][9] = skip[9][7] = 8;
        skip[1][9] = skip[9][1] = skip[2][8] = skip[8][2] = skip[3][7] = skip[7][3] = skip[4][6] = skip[6][4] = 5;
        boolean vis[] = new boolean[10];
        int rst = 0;
        // DFS search each length from m to n
        for(int i = m; i <= n; ++i) {
            rst += DFS(vis, skip, 1, i - 1) * 4;    // 1, 3, 7, 9 are symmetric
            rst += DFS(vis, skip, 2, i - 1) * 4;    // 2, 4, 6, 8 are symmetric
            rst += DFS(vis, skip, 5, i - 1);        // 5
        }
        return rst;
    }

    // cur: the current position
    // remain: the steps remaining
    int DFS(boolean vis[], int[][] skip, int cur, int remain) {
        if(remain < 0) return 0;
        if(remain == 0) return 1;
        vis[cur] = true;
        int rst = 0;
        for(int i = 1; i <= 9; ++i) {
            // If vis[i] is not visited and (two numbers are adjacent or skip number is already visited)
            if(!vis[i] && (skip[cur][i] == 0 || (vis[skip[cur][i]]))) {
                rst += DFS(vis, skip, i, remain - 1);
            }
        }
        vis[cur] = false;
        return rst;
    }


    public int numberOfPatterns3(int m, int n) {
        boolean[][] visited = new boolean[3][3];
        int[] res = new int[1];
        
        for (int i=0; i<3; i++) {
            for (int j=0; j<3; j++) {
                dfs(i, j, visited, m, n, 1, res);
            }
        }
        return res[0];
    }
    
    private void dfs(int i, int j, boolean[][] visited, int m, int n, int len, int[] res) {
        if (visited[i][j] || len > n) return;
        if (len >= m) res[0]++;
        visited[i][j] = true;
        for (int ii=0; ii<3; ii++) {
            int di = Math.abs(i - ii);
            for (int jj=0; jj<3; jj++) {
                int dj = Math.abs(j - jj);
                if (di == 0 && dj == 0) continue;
                if ((di == 2 && dj != 1) || (dj == 2 && di != 1)) {
                    if (!visited[(i+ii)/2][(j+jj)/2]) continue;
                }
                dfs(ii, jj, visited, m, n, len+1, res);
            }
        }
        visited[i][j] = false;
    }

}


================================================
FILE: src/AsyncJobMonitor.java
================================================
/**
 * 
 */

import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class AsyncJobMonitor {

    private static final long INIT_TIME = System.currentTimeMillis();

    private Queue<Job> queue = new ConcurrentLinkedQueue<>();
    private Map<String, Long> endMap = new ConcurrentHashMap<>();

    public void start(Job job) {
        queue.add(job);
    }

    public void end(String id, long end) {
        endMap.put(id, end);
        cleanQueue();
    }

    private void cleanQueue() {
        while (!queue.isEmpty() && endMap.containsKey(queue.peek().id)) {
            Job curr = queue.poll();
            curr.end = endMap.get(curr.id);
            endMap.remove(curr.id);
            printJob(curr);
        }
    }

    private void printJob(Job job) {
        System.out.println(String.format("now: %s, job: %s, start: %s, end: %s",
                System.currentTimeMillis() - INIT_TIME,
                job.id,
                job.start - INIT_TIME,
                job.end - INIT_TIME));
    }

    static class Job {
        String id;
        long start;
        long end;
        Job(String id, long start) {
           this.id = id;
           this.start = start;
        }
    }

    public static void main(String[] args) {
        AsyncJobMonitor monitor = new AsyncJobMonitor();

        ExecutorService executorService = Executors.newFixedThreadPool(5);
        String[] ids = new String[]{"a", "b", "c", "d", "e"};
        long[] times = new long[]{5, 2, 5, 4, 1};
        for (int i=0; i<5; i++) {
            String id = ids[i];
            long time = times[i];
            executorService.execute(() -> {
                Job job = new Job(id, System.currentTimeMillis());
                monitor.start(job);
                try {
                    TimeUnit.SECONDS.sleep(time);
                } catch (InterruptedException ex) {
                    ex.printStackTrace();
                }
                monitor.end(id, System.currentTimeMillis());
            });
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        }

        executorService.shutdown();
    }

}


================================================
FILE: src/AverageOfLevelsInBinaryTree637.java
================================================
/**
 * Given a non-empty binary tree, return the average value of the nodes on each
 * level in the form of an array.
 * 
 * Example 1:
 * Input:
 *     3
 *    / \
 *   9  20
 *     /  \
 *    15   7
 * Output: [3, 14.5, 11]
 * Explanation:
 * The average value of nodes on level 0 is 3,  on level 1 is 14.5, and on
 * level 2 is 11. Hence return [3, 14.5, 11].
 * 
 * Note:
 * The range of node's value is in the range of 32-bit signed integer.
 */

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */

public class AverageOfLevelsInBinaryTree637 {
    public List<Double> averageOfLevels(TreeNode root) {
        List<Double> res = new ArrayList<>();        
        Queue<TreeNode> q = new LinkedList<>();
        q.add(root);
        while (!q.isEmpty()) {
            int size = q.size();
            long sum = 0L;
            for (int i=0; i<size; i++) {
                TreeNode curr = q.poll();
                if (curr.left != null) q.add(curr.left);
                if (curr.right != null) q.add(curr.right);
                sum += curr.val;
            }
            res.add(sum * 1.0 / size);
        }
        return res;
    }

}


================================================
FILE: src/BackspaceStringCompare844.java
================================================
/**
 * Given two strings S and T, return if they are equal when both are typed into
 * empty text editors. # means a backspace character.
 * 
 * Example 1:
 * Input: S = "ab#c", T = "ad#c"
 * Output: true
 * Explanation: Both S and T become "ac".
 * 
 * Example 2:
 * Input: S = "ab##", T = "c#d#"
 * Output: true
 * Explanation: Both S and T become "".
 * 
 * Example 3:
 * Input: S = "a##c", T = "#a#c"
 * Output: true
 * Explanation: Both S and T become "c".
 * 
 * Example 4:
 * Input: S = "a#c", T = "b"
 * Output: false
 * Explanation: S becomes "c" while T becomes "b".
 * 
 * Note:
 * 1 <= S.length <= 200
 * 1 <= T.length <= 200
 * S and T only contain lowercase letters and '#' characters.
 * 
 * Follow up:
 * Can you solve it in O(N) time and O(1) space?
 */

public class BackspaceStringCompare844 {
    public boolean backspaceCompare(String S, String T) {
        int lenS = S.length();
        int lenT = T.length();
    
        int indexS = lenS-1;
        int countS = 0;
        int indexT = lenT-1;
        int countT = 0;
        while (indexS >= 0 && indexT >= 0) {
            char charS = S.charAt(indexS);
            char charT = T.charAt(indexT);
    
            if (charS != '#' && charT != '#' && countS == 0 && countT == 0) {
                if (charS != charT) return false;
                indexS--;
                indexT--;
            } else {
                if (charS == '#') {
                    countS++;
                    indexS--;
                } else {
                    if (countS != 0) {
                        countS--;
                        indexS--;
                    }
                }
                if (charT == '#') {
                    countT++;
                    indexT--;
                } else {
                    if (countT != 0) {
                        countT--;
                        indexT--;
                    }
                }
            }
        }
    
        while (indexS >= 0) {
            if (S.charAt(indexS) == '#') {
                countS++;
            } else {
                if (countS == 0) return false;
                countS--;
            }
            indexS--;
        }
        while (indexT >= 0) {
            if (T.charAt(indexT) == '#') {
                countT++;
            } else {
                if (countT == 0) return false;
                countT--;
            }
            indexT--;
        }
        return true;
    }


    /**
     * https://leetcode.com/problems/backspace-string-compare/solution/
     */
    public boolean backspaceCompare2(String S, String T) {
        return build(S).equals(build(T));
    }

    public String build(String S) {
        Stack<Character> ans = new Stack();
        for (char c: S.toCharArray()) {
            if (c != '#')
                ans.push(c);
            else if (!ans.empty())
                ans.pop();
        }
        return String.valueOf(ans);
    }


    /**
     * https://leetcode.com/problems/backspace-string-compare/solution/
     */
    public boolean backspaceCompare3(String S, String T) {
      int i = S.length() - 1, j = T.length() - 1;
      int skipS = 0, skipT = 0;

      while (i >= 0 || j >= 0) { // While there may be chars in build(S) or build (T)
          while (i >= 0) { // Find position of next possible char in build(S)
              if (S.charAt(i) == '#') {skipS++; i--;}
              else if (skipS > 0) {skipS--; i--;}
              else break;
          }
          while (j >= 0) { // Find position of next possible char in build(T)
              if (T.charAt(j) == '#') {skipT++; j--;}
              else if (skipT > 0) {skipT--; j--;}
              else break;
          }
          // If two actual characters are different
          if (i >= 0 && j >= 0 && S.charAt(i) != T.charAt(j))
              return false;
          // If expecting to compare char vs nothing
          if ((i >= 0) != (j >= 0))
              return false;
          i--; j--;
      }
      return true;
  }

}


================================================
FILE: src/BalancedBinaryTree110.java
================================================
/**
 * Given a binary tree, determine if it is height-balanced.
 *
 * For this problem, a height-balanced binary tree is defined as a binary tree
 * in which the depth of the two subtrees of every node never differ by
 * more than 1.
 */


/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */


public class BalancedBinaryTree110 {

    public boolean isBalanced(TreeNode root) {
        if (root == null) {
            return true;
        }

        int depthL = depth(root.left);
        int depthR = depth(root.right);

        return Math.abs(depthL - depthR) <= 1 && isBalanced(root.left) && isBalanced(root.right);

    }

    private int depth(TreeNode node) {
        if (node == null) {
            return 0;
        }

        int depthL = depth(node.left);
        int depthR = depth(node.right);

        return Math.max(depthL, depthR) + 1;
    }


    /**
     * https://discuss.leetcode.com/topic/11007/java-solution-based-on-height-check-left-and-right-node-in-every-recursion-to-avoid-further-useless-search
     */
    public boolean isBalanced2(TreeNode root) {
        if (root == null) {
            return true;
        }
        return height(root) != -1;

    }

    public int height(TreeNode node){
        if (node == null) {
            return 0;
        }

        int lH = height(node.left);
        if (lH == -1) {
            return -1;
        }

        int rH = height(node.right);
        if (rH == -1) {
            return -1;
        }

        if (lH-rH < -1 || lH-rH > 1) {
            return -1;
        }

        return Math.max(lH,rH) + 1;
    }


    public static void main(String[] args) {
        BalancedBinaryTree110 bbt = new BalancedBinaryTree110();

        TreeNode root1 = new TreeNode(2);
        root1.left = new TreeNode(1);
        root1.right = new TreeNode(3);

        TreeNode root3 = new TreeNode(2);
        root3.left = new TreeNode(1);

        TreeNode root2 = new TreeNode(2);
        root2.left = root3;


        TreeNode n1 = new TreeNode(1);
        TreeNode n2 = new TreeNode(2);
        TreeNode n3 = new TreeNode(3);
        TreeNode n4 = new TreeNode(4);
        TreeNode n5 = new TreeNode(5);
        TreeNode n6 = new TreeNode(6);
        TreeNode n7 = new TreeNode(7);
        TreeNode n8 = new TreeNode(8);

        n4.left = n7;
        n2.left = n4;
        n2.right = n5;
        n1.left = n2;

        n6.right = n8;
        n3.right = n6;
        n1.right = n3;


        System.out.println("-------- 1");
        System.out.println(bbt.isBalanced(root1));
        System.out.println("-------- 2");
        System.out.println(bbt.isBalanced(root2));
        System.out.println("-------- 3");
        System.out.println(bbt.isBalanced(root3));
        System.out.println("-------- 4");
        System.out.println(bbt.isBalanced(n1));
    }
}


================================================
FILE: src/BaseballGame682.java
================================================
/**
 * You're now a baseball game point recorder.
 * 
 * Given a list of strings, each string can be one of the 4 following types:
 * 
 * Integer (one round's score): Directly represents the number of points you get in this round.
 * "+" (one round's score): Represents that the points you get in this round are the sum of the last two valid round's points.
 * "D" (one round's score): Represents that the points you get in this round are the doubled data of the last valid round's points.
 * "C" (an operation, which isn't a round's score): Represents the last valid round's points you get were invalid and should be removed.
 * Each round's operation is permanent and could have an impact on the round before and the round after.
 * 
 * You need to return the sum of the points you could get in all the rounds.
 * 
 * Example 1:
 * Input: ["5","2","C","D","+"]
 * Output: 30
 * Explanation: 
 * Round 1: You could get 5 points. The sum is: 5.
 * Round 2: You could get 2 points. The sum is: 7.
 * Operation 1: The round 2's data was invalid. The sum is: 5.  
 * Round 3: You could get 10 points (the round 2's data has been removed). The sum is: 15.
 * Round 4: You could get 5 + 10 = 15 points. The sum is: 30.
 * 
 * Example 2:
 * Input: ["5","-2","4","C","D","9","+","+"]
 * Output: 27
 * Explanation: 
 * Round 1: You could get 5 points. The sum is: 5.
 * Round 2: You could get -2 points. The sum is: 3.
 * Round 3: You could get 4 points. The sum is: 7.
 * Operation 1: The round 3's data is invalid. The sum is: 3.  
 * Round 4: You could get -4 points (the round 3's data has been removed). The sum is: -1.
 * Round 5: You could get 9 points. The sum is: 8.
 * Round 6: You could get -4 + 9 = 5 points. The sum is 13.
 * Round 7: You could get 9 + 5 = 14 points. The sum is 27.
 * 
 * Note:
 * The size of the input list will be between 1 and 1000.
 * Every integer represented in the list will be between -30000 and 30000.
 */

public class BaseballGame682 {
    public int calPoints(String[] ops) {
        if (ops == null || ops.length == 0) return 0;
        Stack<Integer> stack = new Stack<>();
        int sum = 0;
        for (String op: ops) {
            if (op.equals("+")) {
                if (stack.size() >= 2) {
                    int e1 = stack.pop();
                    int e2 = stack.peek();
                    int twoSum = e1 + e2;
                    sum += twoSum;
                    stack.push(e1);
                    stack.push(twoSum);
                }
            } else if (op.equals("D")) {
                if (!stack.isEmpty()) {
                    int doubledScore = stack.peek() * 2;
                    sum += doubledScore;
                    stack.push(doubledScore);
                }
            } else if (op.equals("C")) {
                if (!stack.isEmpty()) {
                    int lastScore = stack.pop();
                    sum -= lastScore;
                }
            } else {
                int now = Integer.parseInt(op);
                sum += now;
                stack.push(now);
            }
        }
        
        return sum;
    }

}


================================================
FILE: src/BasicCalculator224.java
================================================
/**
 * Implement a basic calculator to evaluate a simple expression string.
 *
 * The expression string may contain open ( and closing parentheses ), the
 * plus + or minus sign -, non-negative integers and empty spaces .
 *
 * You may assume that the given expression is always valid.
 *
 * Some examples:
 * "1 + 1" = 2
 * " 2-1 + 2 " = 3
 * "(1+(4+5+2)-3)+(6+8)" = 23
 * Note: Do not use the eval built-in library function.
 *
 */


public class BasicCalculator224 {
    public int calculate(String s) {
        int L = s.length();
        int result = 0;
        int start = 0;
        boolean isNum = false;
        boolean doPlus = true;
        for (int i=0; i<L; i++) {
            char c = s.charAt(i);
            if (isDigit(c) && !isNum) {
                start = i;
                isNum = true;
                continue;
            }
            if (isDigit(c)) continue;

            if (isNum) {
                result = doCal(s, result, start, i, doPlus);
                isNum = false;
            }
            if (isPlus(c)) {
                doPlus = true;
            } else if (isMunis(c)) {
                doPlus = false;
            } else if (isOpen(c)) {
                List<Integer> l = calculate(s, i+1, L);
                result = doCal(result, l.get(0), doPlus);
                i = l.get(1);
            }
        }
        if (isNum) {
            return doCal(s, result, start, L, doPlus);
        }

        return result;
    }

    private List<Integer> calculate(String s, int from, int L) {
        int result = 0;
        int start = from;
        int to = from;
        boolean isNum = false;
        boolean doPlus = true;
        for (int i=from; i<L; i++) {
            char c = s.charAt(i);
            if (isDigit(c) && !isNum) {
                start = i;
                isNum = true;
                continue;
            }
            if (isDigit(c)) continue;

            if (isNum) {
                result = doCal(s, result, start, i, doPlus);
                isNum = false;
            }
            if (isPlus(c)) {
                doPlus = true;
            } else if (isMunis(c)) {
                doPlus = false;
            } else if (isOpen(c)) {
                List<Integer> l = calculate(s, i+1, L);
                result = doCal(result, l.get(0), doPlus);
                i = l.get(1);
            } else {
                to = i;
                break;
            }
        }
        if (isNum) {
            return Arrays.asList(doCal(s, result, start, to, doPlus), to);
        }

        return Arrays.asList(result, to);
    }

    private int doCal(String s, int previous, int start, int end, boolean doPlus) {
        int num = Integer.parseInt(s.substring(start, end));
        return doCal(previous, num, doPlus);
    }

    private int doCal(int previous, int num, boolean doPlus) {
        if (doPlus) {
            return previous + num;
        } else {
            return previous - num;
        }
    }

    private boolean isPlus(char c) {
        return c == '+';
    }
    private boolean isMunis(char c) {
        return c == '-';
    }
    private boolean isOpen(char c) {
        return c == '(';
    }
    private boolean isClose(char c) {
        return c == ')';
    }
    private boolean isDigit(char c) {
        return c >= '0' && c <= '9';
    }
    private boolean isSpace(char c) {
        return c == ' ';
    }


    /**
     * https://discuss.leetcode.com/topic/15816/iterative-java-solution-with-stack
     */
    public int calculate2(String s) {
        Stack<Integer> stack = new Stack<Integer>();
        int result = 0;
        int number = 0;
        int sign = 1;
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(Character.isDigit(c)){
                number = 10 * number + (int)(c - '0');
            }else if(c == '+'){
                result += sign * number;
                number = 0;
                sign = 1;
            }else if(c == '-'){
                result += sign * number;
                number = 0;
                sign = -1;
            }else if(c == '('){
                //we push the result first, then sign;
                stack.push(result);
                stack.push(sign);
                //reset the sign and result for the value in the parenthesis
                sign = 1;
                result = 0;
            }else if(c == ')'){
                result += sign * number;
                number = 0;
                result *= stack.pop();    //stack.pop() is the sign before the parenthesis
                result += stack.pop();   //stack.pop() now is the result calculated before the parenthesis
            }
        }
        if(number != 0) result += sign * number;
        return result;
    }


    public int calculate3(String s) {
        char[] chars = s.toCharArray();
        int i = 0;
        int N = chars.length;
        int sign = 1;
        Stack<String> stack = new Stack<>();
        while (i < N) {
            char ch = chars[i];
            if (ch == ' ') {
                i++;
            } else if (ch == '+') {
                sign = 1;
                i++;
            } else if (ch == '-') {
                sign = -1;
                i++;
            } else if (ch == '(') {
                stack.push((sign == 1 ? "+" : "-") + Character.toString(ch));
                sign = 1;
                i++;
            } else if (ch == ')') {
                int local = 0;
                while (!stack.isEmpty() && !stack.peek().endsWith("(")) {
                    local += Integer.valueOf(stack.pop());
                }
                if (stack.isEmpty()) {
                    stack.push(Integer.toString(local));
                } else {
                    String op = stack.pop();
                    if (op.startsWith("+")) {
                        stack.push(Integer.toString(local));
                    } else {
                        stack.push(Integer.toString(-local));
                    }
                }
                i++;
            } else {
                int j = getNum(chars, i);
                stack.push((sign == 1 ? "+" : "-") + s.substring(i, j));
                i = j;
            }
            
        }
        int res = 0;
        while (!stack.isEmpty()) res += Integer.valueOf(stack.pop());
        return res;
    }

    private int getNum(char[] chars, int i) {
        int j = i;
        while (j < chars.length && Character.isDigit(chars[j])) j++;
        return j;
    }

    /**
     * https://leetcode.com/problems/basic-calculator-ii/discuss/63088/Explanation-for-Java-O(n)-time-and-O(1)-space-solution
     */
    public int calculate4(String s) {
        int pre = 0, curr = 0, sign = 1, op = 0, num = 0;
        
        for (int i = 0; i < s.length(); i++) {
            if (Character.isDigit(s.charAt(i))) {
                num = num * 10 + (s.charAt(i) - '0');
                if (i == s.length() - 1 || !Character.isDigit(s.charAt(i + 1))) {
                    curr = (op == 0 ? num : (op == 1 ? curr * num : curr / num));
                }
                
            } else if (s.charAt(i) == '*' || s.charAt(i) == '/') {
                op = (s.charAt(i) == '*' ? 1 : -1);
                num = 0;
                
            } else if (s.charAt(i) == '+' || s.charAt(i) == '-') {
                pre += sign * curr;
                sign = (s.charAt(i) == '+' ? 1 : -1);
                op = 0;
                num = 0;
            }
        }
        
        return pre + sign * curr;
    }

}


================================================
FILE: src/BasicCalculatorII227.java
================================================
/**
 * Implement a basic calculator to evaluate a simple expression string.
 * 
 * The expression string contains only non-negative integers, +, -, *, /
 * operators and empty spaces . The integer division should truncate toward
 * zero.
 * 
 * Example 1:
 * Input: "3+2*2"
 * Output: 7
 * 
 * Example 2:
 * Input: " 3/2 "
 * Output: 1
 * 
 * Example 3:
 * Input: " 3+5 / 2 "
 * Output: 5
 * 
 * Note:
 * You may assume that the given expression is always valid.
 * Do not use the eval built-in library function.
 */

public class BasicCalculatorII227 {
    public int calculate(String s) {
        char[] chars = s.toCharArray();
        int N = s.length();
        int res = 0;
        int i = 0;
        while (i < N && chars[i] == ' ') i++;
        int j = getNum(chars, i);
        int num = Integer.valueOf(s.substring(i, j));
        i = j;
        while (i < N) {
            while (i < N && chars[i] == ' ') i++;
            if (i == N) break;
            char op = chars[i];
            i++;
            while (i < N && chars[i] == ' ') i++;
            if (i == N) break;
            j = getNum(chars, i);
            int curr = Integer.valueOf(s.substring(i, j));
            i = j;
            if (op == '+') {
                res += num;
                num = curr;
            } else if (op == '-') {
                res += num;
                num = -curr;
            } else if (op == '*') {
                num *= curr;
            } else {
                num /= curr;
            }
        }
        return res + num;
    }

    private int getNum(char[] chars, int i) {
        int j = i;
        while (j < chars.length && Character.isDigit(chars[j])) {
            j++;
        }
        return j;
    }





}



================================================
FILE: src/Bench.java
================================================
/**
 * https://www.careercup.com/question?id=6204431937830912
 */

import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Comparator;

public class Bench {
    public static void sitFarestFromPeople(boolean[] bench, int k) {
        if (bench == null || bench.length == 0 || k <= 0) return;
        Comparator<Range> comp = (r1, r2) -> Integer.compare(r2.right - r2.left, r1.right - r1.left);
        PriorityQueue<Range> pq = new PriorityQueue<>(1, comp);
        int L = bench.length;
        int pre = -1;
        for (int i=0; i<L; i++) {
            if (!bench[i]) continue;
            if (pre == -1) {
                pq.add(new Range(-i, i));
            } else if (pre + 1 < i) {
                pq.add(new Range(pre, i));
            }
            pre = i;
        }
        if (pre != -1) {
            pq.add(new Range(pre, (L-1-pre)*2+pre));
        } else {
            pq.add(new Range(-(L-1), L-1));
        }

        for (int j=0; j<k; j++) {
            if (pq.isEmpty()) return;
            Range curr = pq.poll();
            int mid = (curr.right - curr.left) / 2 + curr.left;
            bench[mid] = true;
            if (curr.left >= 0 && curr.left + 1 < mid) {
                pq.add(new Range(curr.left, mid));
            }
            if (curr.right < L && mid + 1 < curr.right) {
                pq.add(new Range(mid, curr.right));
            }
        }
    }

    static class Range {
        int left;
        int right;
        Range (int l, int r) {
            this.left = l;
            this.right = r;
        }
    }


    public static void main(String[] args) {
        boolean[] bench1 = new boolean[]{true, false, false, false, true, false, true};
        sitFarestFromPeople(bench1, 1);
        System.out.println(Arrays.toString(bench1));

        boolean[] bench2 = new boolean[]{true, false, false, false, false, true, false, true};
        sitFarestFromPeople(bench2, 2);
        System.out.println(Arrays.toString(bench2));

        boolean[] bench3 = new boolean[]{false, false, false, true, false, true};
        sitFarestFromPeople(bench3, 2);
        System.out.println(Arrays.toString(bench3));
    }

}


================================================
FILE: src/BestMeetingPoint296.java
================================================
/**
 * A group of two or more people wants to meet and minimize the total travel
 * distance. You are given a 2D grid of values 0 or 1, where each 1 marks the
 * home of someone in the group. The distance is calculated using
 * Manhattan Distance (http://en.wikipedia.org/wiki/Taxicab_geometry), where
 * distance(p1, p2) = |p2.x - p1.x| + |p2.y - p1.y|.
 * 
 * Example:
 * 
 * Input:
 * 1 - 0 - 0 - 0 - 1
 * |   |   |   |   |
 * 0 - 0 - 0 - 0 - 0
 * |   |   |   |   |
 * 0 - 0 - 1 - 0 - 0
 * 
 * Output: 6
 * 
 * Explanation: Given three people living at (0,0), (0,4), and (2,2):
 * The point (0,2) is an ideal meeting point, as the total travel distance
 * of 2+2+2=6 is minimal. So return 6.
 */

public class BestMeetingPoint296 {
    /**
     * https://leetcode.com/problems/best-meeting-point/discuss/74186/14ms-java-solution
     */
    public int minTotalDistance(int[][] grid) {
        int m = grid.length;
        int n = grid[0].length;
        List<Integer> I = new ArrayList<>(m);
        List<Integer> J = new ArrayList<>(n);
        for(int i = 0; i < m; i++){
            for(int j = 0; j < n; j++){
                if(grid[i][j] == 1){
                    I.add(i);
                    J.add(j);
                }
            }
        }
        return getMin(I) + getMin(J);
    }

    private int getMin(List<Integer> list){
        int ret = 0;
        Collections.sort(list);
        int i = 0;
        int j = list.size() - 1;
        while(i < j){
            ret += list.get(j--) - list.get(i++);
        }
        return ret;
    }

}


================================================
FILE: src/BestTimeToBuyAndSellStock121.java
================================================
/**
 * Say you have an array for which the ith element is the price of a given
 * stock on day i.
 *
 * If you were only permitted to complete at most one transaction (ie, buy one
 * and sell one share of the stock), design an algorithm to find the maximum
 * profit.
 *
 * Example 1:
 * Input: [7, 1, 5, 3, 6, 4]
 * Output: 5
 *
 * max. difference = 6-1 = 5 (not 7-1 = 6, as selling price needs to be larger than buying price)
 *
 * Example 2:
 * Input: [7, 6, 4, 3, 1]
 * Output: 0
 *
 * In this case, no transaction is done, i.e. max profit = 0.
 *
 */


public class BestTimeToBuyAndSellStock121 {
    public int maxProfit(int[] prices) {
        if (prices == null || prices.length <= 1) return 0;

        int minSoFar = Integer.MAX_VALUE;
        int res = 0;

        for (int p: prices) {
            if (p > minSoFar) {
                res = Math.max(res, p - minSoFar);
            } else {
                minSoFar = p;
            }
        }

        return res;
    }

    public int maxProfit2(int[] prices) {
        int buy = Integer.MIN_VALUE;
        int sell = 0;
        for (int p: prices) {
            int oldBuy = buy;
            buy = Math.max(buy, - p);
            sell = Math.max(sell, oldBuy + p);
        }
        return sell;
    }

}


================================================
FILE: src/BestTimeToBuyAndSellStockII122.java
================================================
/**
 * Say you have an array for which the ith element is the price of a given stock
 * on day i.
 *
 * Design an algorithm to find the maximum profit. You may complete as many
 * transactions as you like (ie, buy one and sell one share of the stock
 * multiple times). However, you may not engage in multiple transactions at
 * the same time (ie, you must sell the stock before you buy again).
 *
 */


public class BestTimeToBuyAndSellStockII122 {
    public int maxProfit(int[] prices) {
        if (prices == null || prices
Download .txt
gitextract_ximp81dy/

├── .gitignore
├── README.md
└── src/
    ├── .gitignore
    ├── AccountsMerge721.java
    ├── AddBinary67.java
    ├── AddBoldTagInString616.java
    ├── AddOneRowToTree623.java
    ├── AddStrings415.java
    ├── AddTwoNumbers2.java
    ├── AddTwoNumbersII445.java
    ├── AlienDictionary269.java
    ├── AllNodesDistanceKInBinaryTree863.java
    ├── AllOOneDataStructure432.java
    ├── AllPathsFromSourceToTarget797.java
    ├── AndroidUnlockPatterns351.java
    ├── AsyncJobMonitor.java
    ├── AverageOfLevelsInBinaryTree637.java
    ├── BackspaceStringCompare844.java
    ├── BalancedBinaryTree110.java
    ├── BaseballGame682.java
    ├── BasicCalculator224.java
    ├── BasicCalculatorII227.java
    ├── Bench.java
    ├── BestMeetingPoint296.java
    ├── BestTimeToBuyAndSellStock121.java
    ├── BestTimeToBuyAndSellStockII122.java
    ├── BestTimeToBuyAndSellStockIII123.java
    ├── BestTimeToBuyAndSellStockIV188.java
    ├── BestTimeToBuyAndSellStockWithCooldown309.java
    ├── BestTimeToBuyAndSellStockWithTransactionFee714.java
    ├── BinarySearchTreeIterator173.java
    ├── BinaryTreeInorderTraversal94.java
    ├── BinaryTreeLevelOrderTraversal102.java
    ├── BinaryTreeLevelOrderTraversalII107.java
    ├── BinaryTreeLongestConsecutiveSequence298.java
    ├── BinaryTreeMaximumPathSum124.java
    ├── BinaryTreePaths257.java
    ├── BinaryTreePreorderTraversal144.java
    ├── BinaryTreeRightSideView199.java
    ├── BinaryTreeVerticalOrderTraversal314.java
    ├── BinaryTreeZigzagLevelOrderTraversal103.java
    ├── BinaryTreesWithFactors823.java
    ├── BitwiseANDOfNumbersRange201.java
    ├── BoatsToSavePeople885.java
    ├── BombEnemy361.java
    ├── BoundaryOfBinaryTree545.java
    ├── BrickWall554.java
    ├── BricksFallingWhenHit803.java
    ├── BuddyStrings859.java
    ├── BullsAndCows299.java
    ├── BurstBalloons312.java
    ├── CanIWin464.java
    ├── CheapestFlightsWithinKStops787.java
    ├── ClimbingStairs70.java
    ├── CloneGraph133.java
    ├── ClosestBinarySearchTreeValue270.java
    ├── ClosestBinarySearchTreeValueII272.java
    ├── CoinChange322.java
    ├── CoinChangeII518.java
    ├── CollatzConjecture.java
    ├── CombinationSum39.java
    ├── CombinationSumIII216.java
    ├── CombinationSumIV377.java
    ├── CompareVersionNumbers165.java
    ├── ConcatenatedWords472.java
    ├── ConstructBinaryTreeFromInorderAndPostorderTraversal106.java
    ├── ConstructBinaryTreeFromPreorderAndInorderTraversal105.java
    ├── ConstructBinaryTreeFromString536.java
    ├── ConstructQuadTree427.java
    ├── ContainerWithMostWater11.java
    ├── ContainsDuplicate217.java
    ├── ContainsDuplicateIII220.java
    ├── ContainsDuplicatesII219.java
    ├── ContiguousArray525.java
    ├── ContinuousSubarraySum523.java
    ├── ConvertANumberToHexadecimal405.java
    ├── ConvertBSTToGreaterTree538.java
    ├── ConvertBinarySearchTreeToSortedDoublyLinkedList.java
    ├── ConvertSortedArrayToBinarySearchTree108.java
    ├── ConvertSortedListToBST109.java
    ├── CopyListWithRandomPointer138.java
    ├── CountNumbersWithUniqueDigits357.java
    ├── CountOfRangeSum327.java
    ├── CountOfSmallerNumbersAfterSelf315.java
    ├── CountPrimes204.java
    ├── CountingBits338.java
    ├── CouplesHoldingHands765.java
    ├── CourseSchedule207.java
    ├── CourseScheduleII210.java
    ├── CutOffTreesForGolfEvent675.java
    ├── DailyTemperatures739.java
    ├── DataStreamAsDisjointIntervals352.java
    ├── DecodeString394.java
    ├── DecodeWays91.java
    ├── DecodeWaysII639.java
    ├── DecodedStringAtIndex884.java
    ├── DeleteAndEarn740.java
    ├── DeleteNodeInABST450.java
    ├── DeleteNodeInALinkedList237.java
    ├── DesignCircularDeque641.java
    ├── DesignCircularQueue622.java
    ├── DesignCompressedStringIterator604.java
    ├── DesignHashMap706.java
    ├── DesignHashSet705.java
    ├── DesignHitCounter362.java
    ├── DesignInMemoryFileSystem588.java
    ├── DesignLinkedList707.java
    ├── DesignLogStorageSystem635.java
    ├── DesignSearchAutocompleteSystem642.java
    ├── DesignSnakeGame353.java
    ├── DesignTicTacToe348.java
    ├── DesignTwitter355.java
    ├── DiagonalTraverse498.java
    ├── DiameterOfBinaryTree543.java
    ├── DifferentWaysToAddParentheses241.java
    ├── DivideTwoIntegers29.java
    ├── DominoAndTrominoTiling790.java
    ├── EditDistance72.java
    ├── EmployeeFreeTime759.java
    ├── EncodeAndDecodeStrings271.java
    ├── EncodeAndDecodeTinyURL535.java
    ├── EqualTreePartition663.java
    ├── EvaluateDivision399.java
    ├── EvaluateReversePolishNotation150.java
    ├── ExamRoom855.java
    ├── ExclusiveTimeOfFunctions636.java
    ├── ExpressionAddOperators282.java
    ├── FindAllAnagramsInAString438.java
    ├── FindAllNumbersDisappearedInAnArray448.java
    ├── FindAnagramMappings760.java
    ├── FindAndReplacePattern890.java
    ├── FindBottomLeftTreeValue513.java
    ├── FindCenterOfMassInA2DArray.java
    ├── FindDuplicateSubtrees652.java
    ├── FindEventualSafeStates802.java
    ├── FindKClosestElements658.java
    ├── FindKPairsWithSmallestSums373.java
    ├── FindKthSmallestPairDistance719.java
    ├── FindLargestValueInEachTreeRow515.java
    ├── FindMedianFromDataStream295.java
    ├── FindMinimumInRotatedSortedArray153.java
    ├── FindMinimumInRotatedSortedArrayII154.java
    ├── FindModeInBinarySearchTree501.java
    ├── FindPeakElement162.java
    ├── FindTheCelebrity277.java
    ├── FindTheDuplicateNumber287.java
    ├── FirstBadVersion278.java
    ├── FirstMissingPositive41.java
    ├── FirstUniqueCharacterInAString387.java
    ├── FizzBuzz412.java
    ├── Flatten2DVector251.java
    ├── FlattenBinaryTreeToLinkedList114.java
    ├── FlipGame293.java
    ├── FlippingAnImage832.java
    ├── FourSum18.java
    ├── FourSumII454.java
    ├── FractionToRecurringDecimal166.java
    ├── FriendCircles547.java
    ├── FrogJump403.java
    ├── GameOfLife289.java
    ├── GeneralizedAbbreviation320.java
    ├── GenerateParentheses22.java
    ├── GraphValidTree261.java
    ├── GroupAnagrams49.java
    ├── GroupShiftedStrings249.java
    ├── GuessNumberHigherOrLowerII375.java
    ├── GuessTheWord843.java
    ├── HIndex274.java
    ├── HandOfStraights846.java
    ├── HappyNumber202.java
    ├── HighestPopulationYear.java
    ├── HouseRobber198.java
    ├── HouseRobberII213.java
    ├── HouseRobberIII337.java
    ├── ImageSmoother661.java
    ├── ImplementMagicDictionary676.java
    ├── ImplementQueueUsingStacks232.java
    ├── ImplementStackusingQueues225.java
    ├── ImplementStrStr28.java
    ├── ImplementTriePrefixTree208.java
    ├── IncreasingSubsequences491.java
    ├── IncreasingTripletSubsequence334.java
    ├── InorderSuccessorInBST285.java
    ├── InsertDeleteGetRandomOOne380.java
    ├── InsertInterval57.java
    ├── InsertIntoACyclicSortedList.java
    ├── InsertionSortList147.java
    ├── IntegerBreak343.java
    ├── IntegerToEnglishWords273.java
    ├── IntegerToRoman12.java
    ├── InterleavingString97.java
    ├── IntersectionOfTwoArrays349.java
    ├── IntersectionOfTwoArraysII350.java
    ├── IntersectionOfTwoLinkedLists160.java
    ├── Interval.java
    ├── InvertBinaryTree226.java
    ├── IsGraphBipartite785.java
    ├── IsSubsequence392.java
    ├── IslandPerimeter463.java
    ├── IsomorphicStrings205.java
    ├── JewelsAndStones771.java
    ├── JudgeRouteCircle657.java
    ├── JumpGame55.java
    ├── JumpGameII45.java
    ├── KEmptySlots683.java
    ├── KMP.java
    ├── KeysAndRooms841.java
    ├── KillProcess582.java
    ├── KokoEatingBananas875.java
    ├── KthLargestElementInAnArray215.java
    ├── KthSmallestElementInABST230.java
    ├── KthSmallestElementInASortedMatrix378.java
    ├── KthSmallestPrimeFraction786.java
    ├── KthSymbolInGrammar779.java
    ├── LFUCache460.java
    ├── LRUCache146.java
    ├── LargestBSTSubtree333.java
    ├── LargestDivisibleSubset368.java
    ├── LargestNumber179.java
    ├── LargestRectangleInHistogram84.java
    ├── LemonadeChange860.java
    ├── LengthOfLongestFibonacciSubsequence873.java
    ├── LetterCombinationsOfAPhoneNumber17.java
    ├── LexicographicalNumbers386.java
    ├── LicenseKeyFormatting482.java
    ├── LinkedListCycle141.java
    ├── LinkedListCycleII142.java
    ├── LinkedListRandomNode382.java
    ├── ListNode.java
    ├── LoggerRateLimiter359.java
    ├── LonelyPixelI531.java
    ├── LongestAbsoluteFilePath388.java
    ├── LongestCommonPrefix14.java
    ├── LongestConsecutiveSequence128.java
    ├── LongestContinuousIncreasingSubsequence674.java
    ├── LongestHarmoniousSubsequence594.java
    ├── LongestIncreasingSubsequence300.java
    ├── LongestMountainInArray845.java
    ├── LongestPalindrome409.java
    ├── LongestPalindromicSubsequence516.java
    ├── LongestPalindromicSubstring5.java
    ├── LongestRepeatingCharacterReplacement424.java
    ├── LongestSubstringWithAtMostKDistinctCharacters340.java
    ├── LongestSubstringWithAtMostTwoDistinctCharacters159.java
    ├── LongestSubstringWithoutRepeatingCharacters3.java
    ├── LongestUnivaluePath687.java
    ├── LongestValidParentheses32.java
    ├── LongestWordInDictionary720.java
    ├── LowestCommonAncestorOfABinarySearchTree235.java
    ├── LowestCommonAncestorOfABinaryTree236.java
    ├── MagicalString481.java
    ├── MajorityElement169.java
    ├── MapSumPairs677.java
    ├── MatchsticksToSquare473.java
    ├── MaxAreaOfIsland695.java
    ├── MaxChunksToMakeSorted769.java
    ├── MaxChunksToMakeSortedII768.java
    ├── MaxConsecutiveOnes485.java
    ├── MaxConsecutiveOnesII487.java
    ├── MaxIncreaseToKeepCitySkyline807.java
    ├── MaxPointsOnALine149.java
    ├── MaxStack716.java
    ├── MaxSumOfRectangleNoLargerThanK363.java
    ├── MaximalRectangle85.java
    ├── MaximalSquare221.java
    ├── MaximizeDistanceToClosestPerson849.java
    ├── MaximumAverageSubarrayI643.java
    ├── MaximumBinaryTree654.java
    ├── MaximumDepthOfBinaryTree104.java
    ├── MaximumFrequencyStack895.java
    ├── MaximumLengthOfPairChain646.java
    ├── MaximumLengthOfRepeatedSubarray718.java
    ├── MaximumProductOfThreeNumbers628.java
    ├── MaximumProductOfWordLengths318.java
    ├── MaximumProductSubarray152.java
    ├── MaximumSizeSubarraySumEqualsK325.java
    ├── MaximumSubarray53.java
    ├── MaximumSumOf3NonOverlappingSubarrays689.java
    ├── MaximumVacationDays568.java
    ├── MaximumWidthOfBinaryTree662.java
    ├── MaximumXOROfTwoNumbersInAnArray421.java
    ├── MedianOfTwoSortedArrays4.java
    ├── MeetingRooms252.java
    ├── MeetingRoomsII253.java
    ├── MergeIntervals56.java
    ├── MergeKSortedLists23.java
    ├── MergeSortedArray88.java
    ├── MergeTwoSortedLists21.java
    ├── MiddleOfTheLinkedList876.java
    ├── MinCostClimbingStairs746.java
    ├── MinStack.java
    ├── Minesweeper529.java
    ├── MinimumASCIIDeleteSumForTwoStrings712.java
    ├── MinimumAbsoluteDifferenceInBST530.java
    ├── MinimumDepthOfBinaryTree111.java
    ├── MinimumDistanceBetweenBSTNodes783.java
    ├── MinimumGeneticMutation433.java
    ├── MinimumHeightTrees310.java
    ├── MinimumMovesToEqualArrayElementsII462.java
    ├── MinimumPathSum64.java
    ├── MinimumSizeSubarraySum209.java
    ├── MinimumWindowSubsequence727.java
    ├── MinimumWindowSubstring76.java
    ├── MissingNumber268.java
    ├── MissingRanges163.java
    ├── MonotoneIncreasingDigits738.java
    ├── MonotonicArray896.java
    ├── MostCommonWord819.java
    ├── MostFrequentSubtreeSum508.java
    ├── MostProfitAssigningWork826.java
    ├── MoveZeroes283.java
    ├── MovingAverageFromDataStream346.java
    ├── MultiplyStrings43.java
    ├── MyCalendarI729.java
    ├── MyCalendarII731.java
    ├── NQueens51.java
    ├── NQueensII52.java
    ├── NaryTreeLevelOrderTraversal429.java
    ├── NaryTreePostorderTraversal590.java
    ├── NestedIterator.java
    ├── NestedListWeightSum339.java
    ├── NextClosestTime681.java
    ├── NextGreaterElementI496.java
    ├── NextGreaterElementII503.java
    ├── NextGreaterElementIII556.java
    ├── NextPermutation31.java
    ├── NonDecreasingArray665.java
    ├── NonOverlappingIntervals435.java
    ├── NumberOfConnectedComponentsInAnUndirectedGraph323.java
    ├── NumberOfCornerRectangles750.java
    ├── NumberOfDigitOne233.java
    ├── NumberOfIslands200.java
    ├── NumberOfIslandsII305.java
    ├── NumberOfLongestIncreasingSubsequence673.java
    ├── NumberOfMatchingSubsequences792.java
    ├── OddEvenLinkedList328.java
    ├── OneEditDistance.java
    ├── OneEditDistance161.java
    ├── OnesAndZeroes474.java
    ├── OpenTheLock752.java
    ├── OptimalAccountBalancing465.java
    ├── OutputContestMatches544.java
    ├── PacificAtlanticWaterFlow417.java
    ├── PaintFence276.java
    ├── PaintHouse256.java
    ├── PaintHouseII265.java
    ├── PalindromeLinkedList234.java
    ├── PalindromeNumber9.java
    ├── PalindromePairs336.java
    ├── PalindromePartitioning131.java
    ├── PalindromePermutationII267.java
    ├── PalindromicSubstrings647.java
    ├── PartitionEqualSubsetSum416.java
    ├── PartitionLabels763.java
    ├── PartitionList86.java
    ├── PartitionToKEqualSumSubsets698.java
    ├── PascalsTriangleII119.java
    ├── PatchingArray330.java
    ├── PathSum112.java
    ├── PathSumII113.java
    ├── PathSumIII437.java
    ├── PeekingIterator284.java
    ├── PerfectSquares279.java
    ├── PermutationInString567.java
    ├── PermutationSequence60.java
    ├── Permutations46.java
    ├── PermutationsII47.java
    ├── PlusOne66.java
    ├── PlusOneLinkedList369.java
    ├── Point.java
    ├── PopulatingNextRightPointersInEachNode116.java
    ├── PopulatingNextRightPointersInEachNodeII117.java
    ├── PossibleBipartition886.java
    ├── PowXN50.java
    ├── PowerOfTwo231.java
    ├── PredictTheWinner486.java
    ├── ProductOfArrayExceptSelf238.java
    ├── ProfitableSchemes879.java
    ├── ProjectionAreaOf3DShapes887.java
    ├── QuadTreeIntersection558.java
    ├── QueueReconstructionByHeight406.java
    ├── RandomFlipMatrix519.java
    ├── RandomListNode.java
    ├── RandomPickIndex398.java
    ├── RangeAddition370.java
    ├── RangeModule715.java
    ├── RangeSumQuery2DImmutable304.java
    ├── RangeSumQuery2DMutable308.java
    ├── RangeSumQueryImmutable303.java
    ├── RangeSumQueryMutable307.java
    ├── RansomNote383.java
    ├── ReadNCharactersGivenRead4IICallMultipleTimes158.java
    ├── ReadNCharactersGivenReadFour157.java
    ├── RearrangeStringKDistanceApart358.java
    ├── ReconstructItinerary332.java
    ├── ReconstructOriginalDigitsFromEnglish423.java
    ├── RectangleArea223.java
    ├── RectangleAreaII850.java
    ├── RectangleOverlap863.java
    ├── RedundantConnection684.java
    ├── RedundantConnectionII685.java
    ├── RegularExpressionMatching10.java
    ├── RemoveDuplicateLetters316.java
    ├── RemoveDuplicatesFromSortedArray26.java
    ├── RemoveDuplicatesFromSortedArrayII80.java
    ├── RemoveDuplicatesFromSortedList83.java
    ├── RemoveDuplicatesFromSortedListII82.java
    ├── RemoveInvalidParentheses301.java
    ├── RemoveLinkedListElements203.java
    ├── RemoveNthNodeFromEndOfList19.java
    ├── ReorderList143.java
    ├── ReorganizeString767.java
    ├── RepeatedDNASequences187.java
    ├── RepeatedStringMatch686.java
    ├── RepeatedSubstringPattern459.java
    ├── ReplaceWords648.java
    ├── RestoreIPAddresses93.java
    ├── ReverseLinkedList206.java
    ├── ReverseLinkedListII92.java
    ├── ReverseNodesInKGroup25.java
    ├── ReverseString344.java
    ├── ReverseStringII541.java
    ├── ReverseVowelsOfAString345.java
    ├── ReverseWordsInAString151.java
    ├── ReverseWordsInAStringII186.java
    ├── ReverseWordsInAStringIII557.java
    ├── RobotRoomCleaner.java
    ├── RomanToInteger13.java
    ├── RotateArray189.java
    ├── RotateFunction396.java
    ├── RotateImage48.java
    ├── RotateList61.java
    ├── RussianDollEnvelopes354.java
    ├── SameTree100.java
    ├── SearchA2DMatrix74.java
    ├── SearchA2DMatrixII240.java
    ├── SearchForARange34.java
    ├── SearchInASortedArrayOfUnknownSize702.java
    ├── SearchInRotatedSortedArray33.java
    ├── SearchInRotatedSortedArrayII81.java
    ├── SearchInsertPosition35.java
    ├── SecondMinimumNodeInABinaryTree671.java
    ├── SentenceScreenFitting418.java
    ├── SentenceSimilarity734.java
    ├── SentenceSimilarityII737.java
    ├── SerializeAndDeserializeBST449.java
    ├── SerializeAndDeserializeBinaryTree297.java
    ├── SetMatrixZeroes73.java
    ├── ShortestBridge934.java
    ├── ShortestCompletingWord748.java
    ├── ShortestDistanceFromAllBuildings317.java
    ├── ShortestPalindrome214.java
    ├── ShortestPathToGetAllKeys864.java
    ├── ShortestSubarrayWithSumAtLeastK862.java
    ├── ShortestWordDistance243.java
    ├── ShuffleAnArray384.java
    ├── SimplifyPath71.java
    ├── SingleElementInASortedArray540.java
    ├── SingleNumber136.java
    ├── SingleNumberII137.java
    ├── SlidingWindowMaximum239.java
    ├── SlidingWindowMedian480.java
    ├── SmallestRange632.java
    ├── SolveTheEquation640.java
    ├── SortArrayByParityII922.java
    ├── SortCharactersByFrequency451.java
    ├── SortColors75.java
    ├── SortList148.java
    ├── SortTransformedArray360.java
    ├── SparseMatrixMultiplication311.java
    ├── SpiralMatrix54.java
    ├── SpiralMatrixII59.java
    ├── SplitArrayIntoConsecutiveSubsequences659.java
    ├── SplitArrayIntoFibonacciSequence842.java
    ├── SplitArrayLargestSum410.java
    ├── SqrtX69.java
    ├── StoneGame877.java
    ├── StringCompression443.java
    ├── StringToInteger8.java
    ├── StrobogrammaticNumber246.java
    ├── StrobogrammaticNumberII247.java
    ├── SubarrayProductLessThanK713.java
    ├── SubarraySumEqualsK560.java
    ├── Subsequence.java
    ├── Subsets78.java
    ├── SubsetsII90.java
    ├── SubtreeOfAnotherTree572.java
    ├── SudokuSolver37.java
    ├── SumOfSquareNumbers633.java
    ├── SumRootToLeafNumbers129.java
    ├── SummaryRanges228.java
    ├── SuperUglyNumber313.java
    ├── SurroundedRegions130.java
    ├── SwapAdjacentInLRString777.java
    ├── SymmetricTree101.java
    ├── TargetSum494.java
    ├── TaskScheduler621.java
    ├── TextJustification68.java
    ├── TheMaze490.java
    ├── TheMazeII505.java
    ├── TheMazeIII499.java
    ├── TheSkylineProblem218.java
    ├── ThirdMaximumNumber414.java
    ├── ThreeSum15.java
    ├── ThreeSumClosest16.java
    ├── ThreeSumSmaller259.java
    ├── ToLowerCase709.java
    ├── TopKFrequentElements347.java
    ├── TopKFrequentWords692.java
    ├── TotalHammingDistance477.java
    ├── TrappingRainWater42.java
    ├── TrappingRainWaterII407.java
    ├── TreeLinkNode.java
    ├── TreeNode.java
    ├── TreeToForestByErasingNodes.java
    ├── Triangle120.java
    ├── TrimABinarySearchTree669.java
    ├── TwoSum1.java
    ├── TwoSumIIInputArrayIsSorted167.java
    ├── TwoSumIVInputIsABST653.java
    ├── UTF8Validation393.java
    ├── UglyNumber263.java
    ├── UglyNumberII264.java
    ├── UncommonWordsFromTwoSentences884.java
    ├── UndirectedGraphNode.java
    ├── UniqueBinarySearchTrees96.java
    ├── UniqueBinarySearchTreesII95.java
    ├── UniqueMorseCodeWords804.java
    ├── UniquePaths62.java
    ├── UniquePathsII63.java
    ├── UniqueWordAbbreviation288.java
    ├── ValidAnagram242.java
    ├── ValidNumber65.java
    ├── ValidPalindrome125.java
    ├── ValidPalindromeII680.java
    ├── ValidParentheses20.java
    ├── ValidParenthesisString678.java
    ├── ValidSudoku36.java
    ├── ValidTriangleNumber611.java
    ├── ValidWordAbbreviation408.java
    ├── ValidateBinarySearchTree98.java
    ├── ValidateStackSequences946.java
    ├── VerifyPreorderSequenceInBinarySearchTree255.java
    ├── WallsAndGates286.java
    ├── WaterAndJugProblem365.java
    ├── WiggleSort280.java
    ├── WiggleSortII324.java
    ├── WiggleSubsequence376.java
    ├── WildcardMatching44.java
    ├── WordAbbreviation527.java
    ├── WordBreak139.java
    ├── WordBreakII140.java
    ├── WordDictionary.java
    ├── WordLadder127.java
    ├── WordLadderII126.java
    ├── WordPattern290.java
    ├── WordPatternII291.java
    ├── WordSearch79.java
    ├── WordSearchII212.java
    ├── WordSquares425.java
    ├── ZeroOneMatrix542.java
    ├── ZigzagIterator281.java
    ├── data-structures/
    │   ├── BinaryIndexedTree.java
    │   ├── BinarySearchTree.java
    │   ├── BinarySearchTreeWithParent.java
    │   ├── DisjointSet.java
    │   ├── LFUCache.java
    │   ├── LRUCache.java
    │   ├── MinHeap.java
    │   ├── Trie.java
    │   └── TrieNode.java
    ├── graph/
    │   ├── Dijkstra.java
    │   ├── README.md
    │   ├── StrongConnectivity.java
    │   └── TopologicalSort.java
    ├── knapsack/
    │   ├── CompleteKnapsack.java
    │   ├── MultipleKnapsack.java
    │   ├── README.md
    │   └── ZeroOneKnapsack.java
    ├── search/
    │   ├── BinarySearch.java
    │   ├── ExponentialSearch.java
    │   ├── InterpolationSearch.java
    │   ├── JumpSearch.java
    │   ├── LinearSearch.java
    │   ├── README.md
    │   └── TernarySearch.java
    └── sort/
        ├── BubbleSort.java
        ├── BucketSort.java
        ├── CountingSort.java
        ├── HeapSort.java
        ├── InsertionSort.java
        ├── MergeSort.java
        ├── QuickSort.java
        ├── README.md
        ├── RadixSort.java
        └── SelectionSort.java
Download .txt
Showing preview only (299K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3448 symbols across 589 files)

FILE: src/AccountsMerge721.java
  class AccountsMerge721 (line 38) | public class AccountsMerge721 {
    method accountsMerge (line 39) | public List<List<String>> accountsMerge(List<List<String>> accounts) {
    method accountsMerge (line 94) | public List<List<String>> accountsMerge(List<List<String>> accounts) {
    method initDSU (line 116) | private DSU initDSU(List<List<String>> accounts, Map<String, String> e...
    class DSU (line 139) | class DSU {
      method DSU (line 142) | public DSU(int size) {
      method find (line 147) | public int find(int x) {
      method union (line 152) | public void union(int x, int y) {
    method accountsMerge3 (line 161) | public List<List<String>> accountsMerge3(List<List<String>> accounts) {
    method initGraph (line 181) | private Map<String, Set<String>> initGraph(List<List<String>> accounts...
    method dfs (line 202) | private void dfs(Map<String, Set<String>> graph, String email, Set<Str...

FILE: src/AddBinary67.java
  class AddBinary67 (line 11) | public class AddBinary67 {
    method addBinary (line 12) | public String addBinary(String a, String b) {
    method addBinary (line 16) | private String addBinary(String a, String b, int i, int j, int carry) {
    method addBinary2 (line 28) | public String addBinary2(String a, String b) {
    method addBinary (line 34) | private void addBinary(String a, String b, int i, int j, int carry, St...
    method addBinary3 (line 49) | public String addBinary3(String a, String b) {
    method addBinary4 (line 85) | public String addBinary4(String a, String b) {
    method charToInt (line 112) | private int charToInt(char c) {

FILE: src/AddBoldTagInString616.java
  class AddBoldTagInString616 (line 28) | public class AddBoldTagInString616 {
    method addBoldTag (line 29) | public String addBoldTag(String s, String[] dict) {
    method constructTrie (line 62) | private Trie constructTrie(String[] dict) {
    method addBoldTag2 (line 70) | public String addBoldTag2(String s, String[] dict) {
    method addBoldTag3 (line 110) | public String addBoldTag3(String s, String[] dict) {
    method addBoldTag4 (line 137) | public String addBoldTag4(String s, String[] dict) {
    class Interval (line 164) | class Interval {
      method Interval (line 166) | public Interval(int s, int e) {
      method toString (line 171) | public String toString() {
    method merge (line 176) | public List<Interval> merge(List<Interval> intervals) {
    method addBoldTag5 (line 206) | public String addBoldTag5(String s, String[] dict) {
    method addBoldTag6 (line 230) | public String addBoldTag6(String s, String[] dict) {
  class Trie (line 258) | class Trie {
    method addWord (line 262) | public void addWord(String word) {
    method addWord (line 266) | public void addWord(char[] chars, int i) {
    method search (line 281) | public int search(char[] chars, int i) {
    method search (line 285) | private int search(char[] chars, int i, int x, int len) {

FILE: src/AddOneRowToTree623.java
  class AddOneRowToTree623 (line 78) | public class AddOneRowToTree623 {
    method addOneRow (line 79) | public TreeNode addOneRow(TreeNode root, int v, int d) {
    method insert (line 91) | private void insert(TreeNode root, int v, int d) {
    method addOneRow3 (line 111) | public TreeNode addOneRow3(TreeNode root, int v, int d) {

FILE: src/AddStrings415.java
  class AddStrings415 (line 13) | public class AddStrings415 {
    method addStrings (line 14) | public String addStrings(String num1, String num2) {
    method addStrings2 (line 39) | public String addStrings2(String num1, String num2) {

FILE: src/AddTwoNumbers2.java
  class AddTwoNumbers2 (line 14) | public class AddTwoNumbers2 {
    method addTwoNumbers (line 15) | public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
    method addTwoNumbers2 (line 36) | public ListNode addTwoNumbers2(ListNode l1, ListNode l2) {

FILE: src/AddTwoNumbersII445.java
  class AddTwoNumbersII445 (line 28) | public class AddTwoNumbersII445 {
    method addTwoNumbers (line 29) | public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
    method addTwoNumbers2 (line 82) | public ListNode addTwoNumbers2(ListNode l1, ListNode l2) {
    method addTwoNumbers0 (line 89) | public ListNode addTwoNumbers0(ListNode l1, ListNode l2) {
    method reverseList (line 110) | public ListNode reverseList(ListNode head) {

FILE: src/AlienDictionary269.java
  class AlienDictionary269 (line 51) | public class AlienDictionary269 {
    method alienOrder (line 59) | public String alienOrder(String[] words) {
    method helper (line 74) | private boolean helper(Character key, Set<Character> path, boolean[] v...
    method initMap (line 88) | private void initMap(String[] words) {
    method updateOn (line 99) | private void updateOn(String word1, String word2) {
    method updateOrderMap (line 109) | private void updateOrderMap(String[] dicts) {
    method alienOrder2 (line 121) | public String alienOrder2(String[] words) {
    method alienOrder3 (line 164) | public String alienOrder3(String[] words) {
    method dfs (line 178) | public boolean dfs(boolean[][] adj, int[] visited, StringBuilder sb, i...
    method buildGraph (line 193) | public void buildGraph(String[] words, boolean[][] adj, int[] visited) {

FILE: src/AllNodesDistanceKInBinaryTree863.java
  class AllNodesDistanceKInBinaryTree863 (line 38) | public class AllNodesDistanceKInBinaryTree863 {
    method distanceK (line 39) | public List<Integer> distanceK(TreeNode root, TreeNode target, int K) {
    method distanceToRoot (line 50) | private int distanceToRoot(TreeNode root, TreeNode target, int K, List...
    method distanceKChildren (line 75) | private void distanceKChildren(TreeNode root, int K, List<Integer> res) {
    method distanceK2 (line 99) | public List<Integer> distanceK2(TreeNode root, TreeNode target, int K) {
    method dfs (line 143) | public void dfs(TreeNode node, TreeNode par) {
    method distanceK3 (line 158) | public List<Integer> distanceK3(TreeNode root, TreeNode target, int K) {
    method dfs (line 167) | public int dfs(TreeNode node) {
    method subtree_add (line 190) | public void subtree_add(TreeNode node, int dist) {
    method distanceK4 (line 202) | public List<Integer> distanceK4(TreeNode root, TreeNode target, int K) {
    method find (line 210) | private int find(TreeNode root, TreeNode target, int K) {
    method dfs (line 229) | private void dfs(TreeNode root, TreeNode target, int K, int length, Li...

FILE: src/AllOOneDataStructure432.java
  class AllOOneDataStructure432 (line 18) | public class AllOOneDataStructure432 {
    class AllOne (line 20) | class AllOne {
      method AllOne (line 26) | public AllOne() {
      method inc (line 35) | public void inc(String key) {
      method dislink (line 65) | private void dislink(KeyNode node) {
      method dislink (line 70) | private void dislink(FreqNode node) {
      method addAfter (line 75) | private void addAfter(KeyNode node, KeyNode newNode) {
      method addAfter (line 82) | private void addAfter(FreqNode node, FreqNode newNode) {
      method dec (line 90) | public void dec(String key) {
      method addBefore (line 114) | private void addBefore(FreqNode node, FreqNode newNode) {
      method getMaxKey (line 122) | public String getMaxKey() {
      method getMinKey (line 128) | public String getMinKey() {
      method isEmpty (line 133) | private boolean isEmpty() {
      method isEmpty (line 137) | private boolean isEmpty(KeyNode node) {
      method isEmpty (line 141) | private boolean isEmpty(FreqNode node) {
      class KeyNode (line 145) | class KeyNode {
        method KeyNode (line 150) | KeyNode() {
        method KeyNode (line 152) | KeyNode(String key) {
        method KeyNode (line 156) | KeyNode(String key, int freq) {
      class FreqNode (line 162) | class FreqNode {
        method FreqNode (line 167) | FreqNode () {
        method FreqNode (line 169) | FreqNode (int freq) {

FILE: src/AllPathsFromSourceToTarget797.java
  class AllPathsFromSourceToTarget797 (line 24) | public class AllPathsFromSourceToTarget797 {
    method allPathsSourceTarget (line 25) | public List<List<Integer>> allPathsSourceTarget(int[][] graph) {
    method backtrace (line 33) | private void backtrace(int[][] graph, int current, int dest, List<Inte...
    method allPathsSourceTarget2 (line 49) | public List<List<Integer>> allPathsSourceTarget2(int[][] graph) {
    method backtrace2 (line 59) | private void backtrace2(int[][] graph, int current, int dest, List<Int...

FILE: src/AndroidUnlockPatterns351.java
  class AndroidUnlockPatterns351 (line 34) | public class AndroidUnlockPatterns351 {
    method numberOfPatterns (line 37) | public int numberOfPatterns(int m, int n) {
    method dfs (line 55) | private void dfs(boolean[][] visited, int i, int j, int m, int n, int ...
    method canGo (line 67) | private boolean canGo(int i1, int j1, int i2, int j2, boolean[][] visi...
    method isJumping (line 72) | private boolean isJumping(int i1, int j1, int i2, int j2) {
    method numberOfPatterns2 (line 79) | public int numberOfPatterns2(int m, int n) {
    method DFS (line 100) | int DFS(boolean vis[], int[][] skip, int cur, int remain) {
    method numberOfPatterns3 (line 116) | public int numberOfPatterns3(int m, int n) {
    method dfs (line 128) | private void dfs(int i, int j, boolean[][] visited, int m, int n, int ...

FILE: src/AsyncJobMonitor.java
  class AsyncJobMonitor (line 13) | public class AsyncJobMonitor {
    method start (line 20) | public void start(Job job) {
    method end (line 24) | public void end(String id, long end) {
    method cleanQueue (line 29) | private void cleanQueue() {
    method printJob (line 38) | private void printJob(Job job) {
    class Job (line 46) | static class Job {
      method Job (line 50) | Job(String id, long start) {
    method main (line 56) | public static void main(String[] args) {

FILE: src/AverageOfLevelsInBinaryTree637.java
  class AverageOfLevelsInBinaryTree637 (line 31) | public class AverageOfLevelsInBinaryTree637 {
    method averageOfLevels (line 32) | public List<Double> averageOfLevels(TreeNode root) {

FILE: src/BackspaceStringCompare844.java
  class BackspaceStringCompare844 (line 34) | public class BackspaceStringCompare844 {
    method backspaceCompare (line 35) | public boolean backspaceCompare(String S, String T) {
    method backspaceCompare2 (line 98) | public boolean backspaceCompare2(String S, String T) {
    method build (line 102) | public String build(String S) {
    method backspaceCompare3 (line 117) | public boolean backspaceCompare3(String S, String T) {

FILE: src/BalancedBinaryTree110.java
  class BalancedBinaryTree110 (line 21) | public class BalancedBinaryTree110 {
    method isBalanced (line 23) | public boolean isBalanced(TreeNode root) {
    method depth (line 35) | private int depth(TreeNode node) {
    method isBalanced2 (line 50) | public boolean isBalanced2(TreeNode root) {
    method height (line 58) | public int height(TreeNode node){
    method main (line 81) | public static void main(String[] args) {

FILE: src/BaseballGame682.java
  class BaseballGame682 (line 42) | public class BaseballGame682 {
    method calPoints (line 43) | public int calPoints(String[] ops) {

FILE: src/BasicCalculator224.java
  class BasicCalculator224 (line 18) | public class BasicCalculator224 {
    method calculate (line 19) | public int calculate(String s) {
    method calculate (line 55) | private List<Integer> calculate(String s, int from, int L) {
    method doCal (line 94) | private int doCal(String s, int previous, int start, int end, boolean ...
    method doCal (line 99) | private int doCal(int previous, int num, boolean doPlus) {
    method isPlus (line 107) | private boolean isPlus(char c) {
    method isMunis (line 110) | private boolean isMunis(char c) {
    method isOpen (line 113) | private boolean isOpen(char c) {
    method isClose (line 116) | private boolean isClose(char c) {
    method isDigit (line 119) | private boolean isDigit(char c) {
    method isSpace (line 122) | private boolean isSpace(char c) {
    method calculate2 (line 130) | public int calculate2(String s) {
    method calculate3 (line 166) | public int calculate3(String s) {
    method getNum (line 214) | private int getNum(char[] chars, int i) {
    method calculate4 (line 223) | public int calculate4(String s) {

FILE: src/BasicCalculatorII227.java
  class BasicCalculatorII227 (line 25) | public class BasicCalculatorII227 {
    method calculate (line 26) | public int calculate(String s) {
    method getNum (line 60) | private int getNum(char[] chars, int i) {

FILE: src/Bench.java
  class Bench (line 9) | public class Bench {
    method sitFarestFromPeople (line 10) | public static void sitFarestFromPeople(boolean[] bench, int k) {
    class Range (line 45) | static class Range {
      method Range (line 48) | Range (int l, int r) {
    method main (line 55) | public static void main(String[] args) {

FILE: src/BestMeetingPoint296.java
  class BestMeetingPoint296 (line 24) | public class BestMeetingPoint296 {
    method minTotalDistance (line 28) | public int minTotalDistance(int[][] grid) {
    method getMin (line 44) | private int getMin(List<Integer> list){

FILE: src/BestTimeToBuyAndSellStock121.java
  class BestTimeToBuyAndSellStock121 (line 24) | public class BestTimeToBuyAndSellStock121 {
    method maxProfit (line 25) | public int maxProfit(int[] prices) {
    method maxProfit2 (line 42) | public int maxProfit2(int[] prices) {

FILE: src/BestTimeToBuyAndSellStockII122.java
  class BestTimeToBuyAndSellStockII122 (line 13) | public class BestTimeToBuyAndSellStockII122 {
    method maxProfit (line 14) | public int maxProfit(int[] prices) {
    method maxProfit2 (line 31) | public int maxProfit2(int[] prices) {
    method maxProfit3 (line 53) | public int maxProfit3(int[] prices) {

FILE: src/BestTimeToBuyAndSellStockIII123.java
  class BestTimeToBuyAndSellStockIII123 (line 14) | public class BestTimeToBuyAndSellStockIII123 {
    method maxProfit (line 15) | public int maxProfit(int[] prices) {
    method maxProfit2 (line 33) | public int maxProfit2(int[] prices) {
    method maxProfit (line 37) | public int maxProfit(int k, int[] prices) {

FILE: src/BestTimeToBuyAndSellStockIV188.java
  class BestTimeToBuyAndSellStockIV188 (line 29) | public class BestTimeToBuyAndSellStockIV188 {
    method maxProfit (line 30) | public int maxProfit(int k, int[] prices) {
    method maxProfit2 (line 61) | public int maxProfit2(int k, int[] prices) {
    method quickSolve (line 76) | private int quickSolve(int[] prices) {

FILE: src/BestTimeToBuyAndSellStockWithCooldown309.java
  class BestTimeToBuyAndSellStockWithCooldown309 (line 24) | public class BestTimeToBuyAndSellStockWithCooldown309 {
    method maxProfit (line 28) | public int maxProfit(int[] prices) {
    method maxProfit2 (line 43) | public int maxProfit2(int[] prices) {

FILE: src/BestTimeToBuyAndSellStockWithTransactionFee714.java
  class BestTimeToBuyAndSellStockWithTransactionFee714 (line 30) | public class BestTimeToBuyAndSellStockWithTransactionFee714 {
    method maxProfit (line 31) | public int maxProfit(int[] prices, int fee) {
    method maxProfit2 (line 47) | public int maxProfit2(int[] prices, int fee) {

FILE: src/BinarySearchTreeIterator173.java
  class BinarySearchTreeIterator173 (line 23) | public class BinarySearchTreeIterator173 {
    class BSTIterator (line 24) | class BSTIterator {
      method BSTIterator (line 27) | public BSTIterator(TreeNode root) {
      method addAllLeft (line 33) | private void addAllLeft(TreeNode node) {
      method hasNext (line 42) | public boolean hasNext() {
      method next (line 47) | public int next() {

FILE: src/BinaryTreeInorderTraversal94.java
  class BinaryTreeInorderTraversal94 (line 33) | public class BinaryTreeInorderTraversal94 {
    method inorderTraversal (line 34) | public List<Integer> inorderTraversal(TreeNode root) {
    method inorderTraversal2 (line 56) | public List<Integer> inorderTraversal2(TreeNode root) {
    method inorderTraversal3 (line 76) | public List<Integer> inorderTraversal3(TreeNode root) {
    method inorderTraversal (line 82) | private void inorderTraversal(TreeNode root, List<Integer> res) {

FILE: src/BinaryTreeLevelOrderTraversal102.java
  class BinaryTreeLevelOrderTraversal102 (line 38) | public class BinaryTreeLevelOrderTraversal102 {
    method levelOrder (line 39) | public List<List<Integer>> levelOrder(TreeNode root) {
    method helper (line 57) | private void helper(Queue<TreeNode> q, List<List<Integer>> result, int...
    method addLevel (line 82) | private void addLevel(List<List<Integer>> result, int level) {
    method levelOrder2 (line 92) | public List<List<Integer>> levelOrder2(TreeNode root) {
    method levelOrder3 (line 113) | public List<List<Integer>> levelOrder3(TreeNode root) {
    method levelOrder (line 140) | public List<List<Integer>> levelOrder(TreeNode root) {
    method levelHelper (line 146) | public void levelHelper(List<List<Integer>> res, TreeNode root, int he...

FILE: src/BinaryTreeLevelOrderTraversalII107.java
  class BinaryTreeLevelOrderTraversalII107 (line 30) | public class BinaryTreeLevelOrderTraversalII107 {
    method levelOrderBottom (line 31) | public List<List<Integer>> levelOrderBottom(TreeNode root) {
    method levelOrderBottom2 (line 51) | public List<List<Integer>> levelOrderBottom2(TreeNode root) {
    method levelOrder (line 58) | private void levelOrder(TreeNode root, int level, LinkedList<List<Inte...

FILE: src/BinaryTreeLongestConsecutiveSequence298.java
  class BinaryTreeLongestConsecutiveSequence298 (line 49) | public class BinaryTreeLongestConsecutiveSequence298 {
    method longestConsecutive (line 50) | public int longestConsecutive(TreeNode root) {
    method helper (line 55) | public int helper(TreeNode root, int i) {
    method longestConsecutive2 (line 85) | public int longestConsecutive2(TreeNode root) {
    method dfs (line 90) | private int dfs(TreeNode p) {

FILE: src/BinaryTreeMaximumPathSum124.java
  class BinaryTreeMaximumPathSum124 (line 18) | public class BinaryTreeMaximumPathSum124 {
    method maxPathSum (line 22) | public int maxPathSum(TreeNode root) {
    method maxBranch (line 28) | private int maxBranch(TreeNode root) {
    method main (line 39) | public static void main(String[] args) {

FILE: src/BinaryTreePaths257.java
  class BinaryTreePaths257 (line 27) | public class BinaryTreePaths257 {
    method binaryTreePaths (line 28) | public List<String> binaryTreePaths(TreeNode root) {
    method binaryTreePaths (line 34) | public void binaryTreePaths(TreeNode root, StringBuilder path, List<St...
    method binaryTreePaths2 (line 54) | public List<String> binaryTreePaths2(TreeNode root) {

FILE: src/BinaryTreePreorderTraversal144.java
  class BinaryTreePreorderTraversal144 (line 27) | public class BinaryTreePreorderTraversal144 {
    method preorderTraversal (line 28) | public List<Integer> preorderTraversal(TreeNode root) {
    method helper (line 34) | private void helper(TreeNode root, List<Integer> res) {
    method preorderTraversal2 (line 42) | public List<Integer> preorderTraversal2(TreeNode root) {

FILE: src/BinaryTreeRightSideView199.java
  class BinaryTreeRightSideView199 (line 29) | public class BinaryTreeRightSideView199 {
    method rightSideView (line 30) | public List<Integer> rightSideView(TreeNode root) {
    method rightSideView (line 36) | public void rightSideView(TreeNode root, List<Integer> res, int level) {

FILE: src/BinaryTreeVerticalOrderTraversal314.java
  class BinaryTreeVerticalOrderTraversal314 (line 76) | public class BinaryTreeVerticalOrderTraversal314 {
    method verticalOrder (line 77) | public List<List<Integer>> verticalOrder(TreeNode root) {
    method verticalOrder2 (line 111) | public List<List<Integer>> verticalOrder2(TreeNode root) {
    method verticalOrder3 (line 151) | public List<List<Integer>> verticalOrder3(TreeNode root) {
    method getRange (line 189) | public void getRange(TreeNode root, int[] range, int col) {

FILE: src/BinaryTreeZigzagLevelOrderTraversal103.java
  class BinaryTreeZigzagLevelOrderTraversal103 (line 33) | public class BinaryTreeZigzagLevelOrderTraversal103 {
    method zigzagLevelOrder (line 34) | public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
    method zigzagLevelOrder (line 43) | private void zigzagLevelOrder(LinkedList<TreeNode> level, boolean left...

FILE: src/BinaryTreesWithFactors823.java
  class BinaryTreesWithFactors823 (line 28) | public class BinaryTreesWithFactors823 {
    method numFactoredBinaryTrees (line 30) | public int numFactoredBinaryTrees(int[] A) {
    method numFactoredBinaryTrees2 (line 61) | public int numFactoredBinaryTrees2(int[] A) {

FILE: src/BitwiseANDOfNumbersRange201.java
  class BitwiseANDOfNumbersRange201 (line 14) | public class BitwiseANDOfNumbersRange201 {
    method rangeBitwiseAnd (line 15) | public int rangeBitwiseAnd(int m, int n) {
    method setBit (line 29) | private int setBit(int num, int pos) {
    method getBit (line 33) | private int getBit(int num, int pos) {
    method rangeBitwiseAnd2 (line 41) | public int rangeBitwiseAnd2(int m, int n) {
    method rangeBitwiseAnd3 (line 58) | public int rangeBitwiseAnd3(int m, int n) {

FILE: src/BoatsToSavePeople885.java
  class BoatsToSavePeople885 (line 31) | public class BoatsToSavePeople885 {
    method numRescueBoats (line 32) | public int numRescueBoats(int[] people, int limit) {

FILE: src/BombEnemy361.java
  class BombEnemy361 (line 18) | public class BombEnemy361 {
    method maxKilledEnemies (line 19) | public int maxKilledEnemies(char[][] grid) {
    method killedByBomb (line 34) | private int killedByBomb(char[][] grid, int i, int j, int n, int m) {
    method maxKilledEnemies2 (line 63) | public int maxKilledEnemies2(char[][] grid) {
    method killedByBomb2 (line 81) | private int killedByBomb2(char[][] grid, int i, int j, int n, int m) {
    method maxKilledEnemies3 (line 131) | public int maxKilledEnemies3(char[][] grid) {
    method maxKilledEnemies4 (line 171) | public int maxKilledEnemies4(char[][] grid) {

FILE: src/BoundaryOfBinaryTree545.java
  class BoundaryOfBinaryTree545 (line 66) | public class BoundaryOfBinaryTree545 {
    method boundaryOfBinaryTree (line 67) | public List<Integer> boundaryOfBinaryTree(TreeNode root) {
    method dfsLeft (line 80) | private void dfsLeft(TreeNode root, boolean[] flag, List<Integer> res) {
    method dfsRight (line 92) | private void dfsRight(TreeNode root, boolean[] flag, List<Integer> res) {

FILE: src/BrickWall554.java
  class BrickWall554 (line 39) | public class BrickWall554 {
    method leastBricks (line 40) | public int leastBricks(List<List<Integer>> wall) {

FILE: src/BricksFallingWhenHit803.java
  class BricksFallingWhenHit803 (line 42) | public class BricksFallingWhenHit803 {
    method hitBricks (line 46) | public int[] hitBricks(int[][] grid, int[][] hits) {
    class DSU (line 97) | class DSU {
      method DSU (line 102) | public DSU(int N) {
      method find (line 111) | public int find(int x) {
      method union (line 116) | public void union(int x, int y) {
      method size (line 133) | public int size(int x) {
      method top (line 137) | public int top() {
    method hitBricks2 (line 146) | public int[] hitBricks2(int[][] grid, int[][] hits) {
    method markRemainBricks (line 153) | private void markRemainBricks(int[][] grid) {
    method removeHitBrick (line 159) | private void removeHitBrick(int[][] grid, int[][] hits) {
    method searchFallingBrick (line 165) | private int[] searchFallingBrick(int[][] grid, int[][] hits) {
    method isConnectToTop (line 180) | private boolean isConnectToTop(int[][] grid, int i, int j) {
    method deepSearch (line 198) | private int deepSearch(int[][] data, int row, int column) {

FILE: src/BuddyStrings859.java
  class BuddyStrings859 (line 31) | public class BuddyStrings859 {
    method buddyStrings (line 32) | public boolean buddyStrings(String A, String B) {

FILE: src/BullsAndCows299.java
  class BullsAndCows299 (line 35) | public class BullsAndCows299 {
    method getHint (line 36) | public String getHint(String secret, String guess) {
    method getHint2 (line 69) | public String getHint2(String secret, String guess) {
    method getHint3 (line 106) | public String getHint3(String secret, String guess) {

FILE: src/BurstBalloons312.java
  class BurstBalloons312 (line 29) | public class BurstBalloons312 {
    method maxCoins (line 30) | public int maxCoins(int[] nums) {
    method maxCoins1 (line 49) | public int maxCoins1(int[] nums) {
    method dp (line 57) | private int dp(int[] nums, Set<Integer> key, Map<Set<Integer>, Integer...
    method maxCoins2 (line 86) | public int maxCoins2(int[] nums) {
    method maxCoins3 (line 112) | public int maxCoins3(int[] iNums) {
    method maxCoins4 (line 132) | public int maxCoins4(int[] iNums) {
    method burst (line 142) | public int burst(int[][] memo, int[] nums, int left, int right) {

FILE: src/CanIWin464.java
  class CanIWin464 (line 33) | public class CanIWin464 {
    method canIWin (line 34) | public boolean canIWin(int maxChoosableInteger, int desiredTotal) {
    method helper (line 42) | private boolean helper(boolean[] set, int desiredTotal, Map<String, Bo...
    method setKey (line 62) | private String setKey(boolean[] set) {
    method canIWin2 (line 72) | public boolean canIWin2(int maxChoosableInteger, int desiredTotal) {
    method helper (line 80) | private boolean helper(int state, int desiredTotal, Boolean[] memo, in...

FILE: src/CheapestFlightsWithinKStops787.java
  class CheapestFlightsWithinKStops787 (line 45) | public class CheapestFlightsWithinKStops787 {
    method findCheapestPrice (line 46) | public int findCheapestPrice(int n, int[][] flights, int src, int dst,...
    method constructGraph (line 73) | private int[][] constructGraph(int n, int[][] flights) {
    method findCheapestPrice2 (line 85) | public int findCheapestPrice2(int n, int[][] flights, int src, int dst...
    method findCheapestPrice3 (line 103) | public int findCheapestPrice3(int n, int[][] flights, int src, int dst...
    class City (line 138) | private class City implements Comparable<City>{
      method City (line 142) | public City(int id, int costFromSrc, int stopFromSrc){
      method equals (line 147) | public boolean equals(City c){
      method compareTo (line 152) | public int compareTo(City c){
    method findCheapestPrice4 (line 157) | public int findCheapestPrice4(int n, int[][] flights, int src, int dst...
    method findCheapestPrice5 (line 200) | public int findCheapestPrice5(int n, int[][] flights, int src, int dst...
    method findCheapestPrice6 (line 220) | public int findCheapestPrice6(int n, int[][] flights, int src, int dst...
    method findCheapestPrice7 (line 234) | public int findCheapestPrice7(int n, int[][] flights, int src, int dst...

FILE: src/ClimbingStairs70.java
  class ClimbingStairs70 (line 32) | public class ClimbingStairs70 {
    method climbStairs (line 33) | public int climbStairs(int n) {
    method climbStairs2 (line 45) | public int climbStairs2(int n) {

FILE: src/CloneGraph133.java
  class CloneGraph133 (line 36) | public class CloneGraph133 {
    method cloneGraph (line 37) | public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) {
    method clone (line 42) | private UndirectedGraphNode clone(UndirectedGraphNode node, HashMap<In...

FILE: src/ClosestBinarySearchTreeValue270.java
  class ClosestBinarySearchTreeValue270 (line 34) | public class ClosestBinarySearchTreeValue270 {
    method closestValue (line 35) | public int closestValue(TreeNode root, double target) {
    method closestValue (line 39) | private int closestValue(TreeNode root, double target, Integer mi, Int...
    method closestValue2 (line 57) | public int closestValue2(TreeNode root, double target) {
    method closestValue3 (line 83) | public int closestValue3(TreeNode root, double target) {
    method closestValue4 (line 95) | public int closestValue4(TreeNode root, double target) {

FILE: src/ClosestBinarySearchTreeValueII272.java
  class ClosestBinarySearchTreeValueII272 (line 38) | public class ClosestBinarySearchTreeValueII272 {
    method closestKValues (line 39) | public List<Integer> closestKValues(TreeNode root, double target, int ...
    method helper (line 45) | private void helper(TreeNode root, double target, int k, LinkedList<In...
    method cut (line 53) | private void cut(double target, int k, LinkedList<Integer> res) {

FILE: src/CoinChange322.java
  class CoinChange322 (line 20) | public class CoinChange322 {
    method coinChange (line 21) | public int coinChange(int[] coins, int amount) {
    method helper (line 26) | private int helper(int idx, int[] coins, int left) {
    method coinChange2 (line 52) | public int coinChange2(int[] coins, int amount) {
    method dp (line 57) | private int dp(int[] coins, int left, int[] amounts) {
    method coinChange3 (line 75) | public int coinChange3(int[] coins, int amount) {
    method coinChange4 (line 90) | public int coinChange4(int[] coins, int amount) {
    method coinChange5 (line 105) | public int coinChange5(int[] coins, int amount) {
    method coinChange6 (line 118) | public int coinChange6(int[] coins, int amount) {
    method coinChange (line 125) | public void coinChange(int[] coins, int amount, int idx, int[] res, in...

FILE: src/CoinChangeII518.java
  class CoinChangeII518 (line 39) | public class CoinChangeII518 {
    method change (line 40) | public int change(int amount, int[] coins) {
    method change2 (line 54) | public int change2(int amount, int[] coins) {
    method change3 (line 66) | public int change3(int amount, int[] coins) {

FILE: src/CollatzConjecture.java
  class CollatzConjecture (line 5) | public class CollatzConjecture {
    method maxSteps (line 28) | public int maxSteps(int n) {
    method steps (line 38) | public int steps(int i, int[] memo) {

FILE: src/CombinationSum39.java
  class CombinationSum39 (line 30) | public class CombinationSum39 {
    method combinationSum (line 31) | public List<List<Integer>> combinationSum(int[] candidates, int target) {
    method helper (line 37) | private void helper(int[] candidates, int target, int start, List<Inte...

FILE: src/CombinationSumIII216.java
  class CombinationSumIII216 (line 19) | public class CombinationSumIII216 {
    method combinationSum3 (line 20) | public List<List<Integer>> combinationSum3(int k, int n) {
    method combinationSum3 (line 26) | private void combinationSum3(int k, int n, List<Integer> path, int sum...

FILE: src/CombinationSumIV377.java
  class CombinationSumIV377 (line 29) | public class CombinationSumIV377 {
    method combinationSum4 (line 30) | public int combinationSum4(int[] nums, int target) {
    method combinationSum42 (line 55) | public int combinationSum42(int[] nums, int target) {
    method helper (line 62) | private int helper(int[] nums, int target) {
    method combinationSum43 (line 77) | public int combinationSum43(int[] nums, int target) {

FILE: src/CompareVersionNumbers165.java
  class CompareVersionNumbers165 (line 29) | public class CompareVersionNumbers165 {
    method compareVersion (line 30) | public int compareVersion(String version1, String version2) {
    method compareVersion2 (line 58) | public int compareVersion2(String version1, String version2) {

FILE: src/ConcatenatedWords472.java
  class ConcatenatedWords472 (line 23) | public class ConcatenatedWords472 {
    method findAllConcatenatedWordsInADict (line 24) | public List<String> findAllConcatenatedWordsInADict(String[] words) {
    method count (line 35) | private int count(Trie trie, char[] chars, int i, Trie root, int cnt) {
    method constructTrie (line 49) | private Trie constructTrie(String[] words) {
    class Trie (line 55) | class Trie {
      method add (line 59) | void add(String word) {
      method add (line 63) | void add(char[] chars, int i) {

FILE: src/ConstructBinaryTreeFromInorderAndPostorderTraversal106.java
  class ConstructBinaryTreeFromInorderAndPostorderTraversal106 (line 30) | public class ConstructBinaryTreeFromInorderAndPostorderTraversal106 {
    method buildTree (line 31) | public TreeNode buildTree(int[] inorder, int[] postorder) {
    method buildTree (line 37) | private TreeNode buildTree(int[] inorder, int ii, int ij, int[] postor...

FILE: src/ConstructBinaryTreeFromPreorderAndInorderTraversal105.java
  class ConstructBinaryTreeFromPreorderAndInorderTraversal105 (line 20) | public class ConstructBinaryTreeFromPreorderAndInorderTraversal105 {
    method buildTree (line 21) | public TreeNode buildTree(int[] preorder, int[] inorder) {
    method search (line 32) | private int search(int[] order, int val) {
    method buildTree2 (line 41) | public TreeNode buildTree2(int[] preorder, int[] inorder) {
    method buildTree (line 47) | public TreeNode buildTree(int[] preorder, int s1, int e1, int[] inorde...
    method search (line 59) | private int search(int[] order, int val, int start, int end) {
    method buildTree3 (line 68) | public TreeNode buildTree3(int[] preorder, int[] inorder) {
    method buildTree (line 73) | private TreeNode buildTree(int[] preorder, int p, int[] inorder, int i...
    method buildTree4 (line 93) | public TreeNode buildTree4(int[] preorder, int[] inorder) {
    method buildTree (line 104) | public TreeNode buildTree(int[] preorder, int preStart, int preEnd, in...

FILE: src/ConstructBinaryTreeFromString536.java
  class ConstructBinaryTreeFromString536 (line 38) | public class ConstructBinaryTreeFromString536 {
    method str2tree (line 39) | public TreeNode str2tree(String s) {
    method str2tree (line 44) | public TreeNode str2tree(char[] chars, int i, int j) {

FILE: src/ConstructQuadTree427.java
  class ConstructQuadTree427 (line 54) | public class ConstructQuadTree427 {
    method construct (line 55) | public Node construct(int[][] grid) {
    method construct (line 61) | public Node construct(int[][] grid, int xi, int xj, int yi, int yj) {
    method allLeaves (line 88) | private boolean allLeaves(Node n) {
    method allSame (line 95) | private boolean allSame(Node n) {

FILE: src/ContainerWithMostWater11.java
  class ContainerWithMostWater11 (line 10) | public class ContainerWithMostWater11 {
    method maxArea (line 38) | public int maxArea(int[] height) {

FILE: src/ContainsDuplicate217.java
  class ContainsDuplicate217 (line 7) | public class ContainsDuplicate217 {
    method containsDuplicate (line 8) | public boolean containsDuplicate(int[] nums) {
    method containsDuplicate2 (line 21) | public boolean containsDuplicate2(int[] nums) {

FILE: src/ContainsDuplicateIII220.java
  class ContainsDuplicateIII220 (line 8) | public class ContainsDuplicateIII220 {
    method containsNearbyAlmostDuplicate (line 24) | public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {
    method getID (line 49) | private long getID(long x, long w) {
    method containsNearbyAlmostDuplicate (line 53) | public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {

FILE: src/ContainsDuplicatesII219.java
  class ContainsDuplicatesII219 (line 14) | public class ContainsDuplicatesII219 {
    method containsNearbyDuplicate (line 16) | public boolean containsNearbyDuplicate(int[] nums, int k) {
    method containsNearbyDuplicate2 (line 33) | public boolean containsNearbyDuplicate2(int[] nums, int k) {
    method containsNearbyDuplicate3 (line 55) | public boolean containsNearbyDuplicate3(int[] nums, int k) {
    method main (line 70) | public static void main(String[] args) {

FILE: src/ContiguousArray525.java
  class ContiguousArray525 (line 22) | public class ContiguousArray525 {
    method findMaxLength (line 26) | public int findMaxLength(int[] nums) {
    method findMaxLength2 (line 44) | public int findMaxLength2(int[] nums) {
    method findMaxLength3 (line 61) | public int findMaxLength3(int[] nums) {

FILE: src/ContinuousSubarraySum523.java
  class ContinuousSubarraySum523 (line 26) | public class ContinuousSubarraySum523 {
    method checkSubarraySum (line 27) | public boolean checkSubarraySum(int[] nums, int k) {
    method kIsNotZero (line 32) | public boolean kIsNotZero(int[] nums, int k) {
    method kIsZero (line 48) | public boolean kIsZero(int[] nums) {
    method checkSubarraySum2 (line 65) | public boolean checkSubarraySum2(int[] nums, int k) {

FILE: src/ConvertANumberToHexadecimal405.java
  class ConvertANumberToHexadecimal405 (line 28) | public class ConvertANumberToHexadecimal405 {
    method toHex (line 29) | public String toHex(int num) {
    method toHex2 (line 45) | public String toHex2(int num) {

FILE: src/ConvertBSTToGreaterTree538.java
  class ConvertBSTToGreaterTree538 (line 30) | public class ConvertBSTToGreaterTree538 {
    method convertBST (line 31) | public TreeNode convertBST(TreeNode root) {
    method convertBST (line 35) | private TreeNode convertBST(TreeNode root, int[] sum) {
    method convertBST2 (line 45) | public TreeNode convertBST2(TreeNode root) {

FILE: src/ConvertBinarySearchTreeToSortedDoublyLinkedList.java
  class ConvertBinarySearchTreeToSortedDoublyLinkedList (line 51) | public class ConvertBinarySearchTreeToSortedDoublyLinkedList {
    method treeToDoublyList (line 52) | public Node treeToDoublyList(Node root) {
    method dfs (line 60) | private Node[] dfs(Node n) {

FILE: src/ConvertSortedArrayToBinarySearchTree108.java
  class ConvertSortedArrayToBinarySearchTree108 (line 35) | class ConvertSortedArrayToBinarySearchTree108 {
    method sortedArrayToBST (line 36) | public TreeNode sortedArrayToBST(int[] nums) {
    method sortedArrayToBST (line 40) | public TreeNode sortedArrayToBST(int[] nums, int i, int j) {

FILE: src/ConvertSortedListToBST109.java
  class ConvertSortedListToBST109 (line 32) | public class ConvertSortedListToBST109 {
    method sortedListToBST (line 33) | public TreeNode sortedListToBST(ListNode head) {
    method storeBSTNodes (line 41) | private void storeBSTNodes(ListNode head, List<TreeNode> nodes) {
    method buildBST (line 48) | private TreeNode buildBST(List<TreeNode> nodes, int start, int end) {
    method sortedListToBST2 (line 67) | public TreeNode sortedListToBST2(ListNode head) {
    method toBST (line 72) | public TreeNode toBST(ListNode head, ListNode tail){
    method sortedListToBST3 (line 96) | public TreeNode sortedListToBST3(ListNode head) {
    method inorderHelper (line 113) | public TreeNode inorderHelper(int start, int end){
    method sortedListToBST4 (line 132) | public TreeNode sortedListToBST4(ListNode head) {
    method sortedListToBST5 (line 153) | public TreeNode sortedListToBST5(ListNode head) {

FILE: src/CopyListWithRandomPointer138.java
  class CopyListWithRandomPointer138 (line 18) | public class CopyListWithRandomPointer138 {
    method copyRandomList (line 19) | public RandomListNode copyRandomList(RandomListNode head) {
    method deepCopy (line 23) | public RandomListNode deepCopy(RandomListNode node, Map<RandomListNode...
    method copyRandomList2 (line 39) | public RandomListNode copyRandomList2(RandomListNode head) {
    method copyRandomList3 (line 66) | public RandomListNode copyRandomList3(RandomListNode head) {

FILE: src/CountNumbersWithUniqueDigits357.java
  class CountNumbersWithUniqueDigits357 (line 11) | public class CountNumbersWithUniqueDigits357 {
    method countNumbersWithUniqueDigits (line 12) | public int countNumbersWithUniqueDigits(int n) {
    method count (line 20) | private int count(int i) {
    method countNumbersWithUniqueDigits2 (line 33) | public int countNumbersWithUniqueDigits2(int n) {
    method count (line 37) | private int count(int n, boolean[] used, int l) {
    method countNumbersWithUniqueDigits3 (line 51) | public int countNumbersWithUniqueDigits3(int n) {
    method count (line 57) | private void count(int n, boolean[] used, int l, int[] res) {

FILE: src/CountOfRangeSum327.java
  class CountOfRangeSum327 (line 21) | public class CountOfRangeSum327 {
    method countRangeSum (line 22) | public int countRangeSum(int[] nums, int lower, int upper) {
    method countRangeSum2 (line 55) | public int countRangeSum2(int[] nums, int lower, int upper) {
    method mergesort (line 69) | private void mergesort(long[] sum, int start, int end, long[] temp) {
    method merge (line 79) | private void merge(long[] sum, int start, int mid, int end, long[] tem...

FILE: src/CountOfSmallerNumbersAfterSelf315.java
  class CountOfSmallerNumbersAfterSelf315 (line 20) | public class CountOfSmallerNumbersAfterSelf315 {
    method countSmaller (line 22) | public List<Integer> countSmaller(int[] nums) {
    method countSmaller2 (line 38) | public List<Integer> countSmaller2(int[] nums) {
    method countSmaller3 (line 72) | public List<Integer> countSmaller3(int[] nums) {
    method mergeSort (line 88) | private void mergeSort(int[][] arr, Integer[] count, int l, int r) {
    method merge (line 98) | private void merge(int[][] arr, Integer[] count, int l, int m, int r) {
    method countSmaller4 (line 142) | public List<Integer> countSmaller4(int[] nums) {
    method insert (line 151) | private Node insert(int num, Node node, Integer[] ans, int i, int preS...
    class Node (line 167) | class Node {
      method Node (line 170) | public Node(int v, int s) {
      method Node (line 304) | Node(int v) {
    method countSmaller5 (line 179) | public List<Integer> countSmaller5(int[] nums) {
    method findIndex (line 190) | private int findIndex(List<Integer> sorted, int target) {
    method countSmaller6 (line 209) | public List<Integer> countSmaller6(int[] nums) {
    class BinaryIndexedTree (line 232) | class BinaryIndexedTree {
      method BinaryIndexedTree (line 236) | BinaryIndexedTree(int N) {
      method update (line 241) | void update(int i, int delta) {
      method query (line 249) | int query(int i) {
      method lowBit (line 259) | private int lowBit(int x) {
    method countSmaller7 (line 265) | public List<Integer> countSmaller7(int[] nums) {
    method insert (line 277) | private int insert(Node root, int val) {
    class Node (line 298) | class Node {
      method Node (line 170) | public Node(int v, int s) {
      method Node (line 304) | Node(int v) {

FILE: src/CountPrimes204.java
  class CountPrimes204 (line 8) | public class CountPrimes204 {
    method countPrimes (line 9) | public int countPrimes(int n) {

FILE: src/CountingBits338.java
  class CountingBits338 (line 21) | public class CountingBits338 {
    method countBits (line 22) | public int[] countBits(int num) {
    method countBits (line 45) | public int[] countBits(int num) {

FILE: src/CouplesHoldingHands765.java
  class CouplesHoldingHands765 (line 37) | public class CouplesHoldingHands765 {
    method minSwapsCouples (line 38) | public int minSwapsCouples(int[] row) {
    method swap (line 55) | private void swap(int[] arr, int i, int j) {

FILE: src/CourseSchedule207.java
  class CourseSchedule207 (line 40) | public class CourseSchedule207 {
    method canFinish (line 41) | public boolean canFinish(int numCourses, int[][] prerequisites) {
    method dfs (line 52) | private boolean dfs(Map<Integer, Set<Integer>> graph, Set<Integer> vis...
    method initGraph (line 66) | private Map<Integer, Set<Integer>> initGraph(int[][] prerequisites) {
    method addEdge (line 74) | private void addEdge(Map<Integer, Set<Integer>> graph, int[] p) {
    method canFinish2s (line 84) | public boolean canFinish2s(int numCourses, int[][] prerequisites) {
    method canFinish3 (line 126) | public boolean canFinish3(int numCourses, int[][] prerequisites) {
    method canFinish4 (line 157) | public boolean canFinish4(int numCourses, int[][] prerequisites) {
    method isCyclic (line 166) | private boolean isCyclic(Set<Integer>[] graph, int numCourses) {
    method isCyclic (line 175) | private boolean isCyclic(Set<Integer>[] graph, int start, boolean[] vi...

FILE: src/CourseScheduleII210.java
  class CourseScheduleII210 (line 44) | public class CourseScheduleII210 {
    method findOrder (line 45) | public int[] findOrder(int numCourses, int[][] prerequisites) {
    method helper (line 67) | private boolean helper(Set<Integer>[] graph, int curr, int numCourses,...
    method findOrder2 (line 83) | public int[] findOrder2(int numCourses, int[][] prerequisites) {

FILE: src/CutOffTreesForGolfEvent675.java
  class CutOffTreesForGolfEvent675 (line 56) | public class CutOffTreesForGolfEvent675 {
    method cutOffTree (line 58) | public int cutOffTree(List<List<Integer>> forest) {
    method minDistance (line 93) | private int minDistance(int[][] golf, Point start, Point end, int M, i...
    class Point (line 120) | class Point {
      method Point (line 123) | Point(int xx, int yy) {
    class TreePoint (line 129) | class TreePoint {
      method TreePoint (line 133) | TreePoint(int xx, int yy, int hh) {

FILE: src/DailyTemperatures739.java
  class DailyTemperatures739 (line 14) | public class DailyTemperatures739 {
    method dailyTemperatures (line 15) | public int[] dailyTemperatures(int[] temperatures) {
    method dailyTemperatures2 (line 36) | public int[] dailyTemperatures2(int[] temperatures) {
    method dailyTemperatures3 (line 54) | public int[] dailyTemperatures3(int[] temperatures) {

FILE: src/DataStreamAsDisjointIntervals352.java
  class DataStreamAsDisjointIntervals352 (line 29) | public class DataStreamAsDisjointIntervals352 {
    class SummaryRanges (line 30) | class SummaryRanges {
      method SummaryRanges (line 34) | public SummaryRanges() {
      method addNum (line 37) | public void addNum(int val) {
      method getIntervals (line 71) | public List<Interval> getIntervals() {
    class SummaryRanges2 (line 81) | class SummaryRanges2 {
      method SummaryRanges2 (line 85) | public SummaryRanges2() {
      method addNum (line 88) | public void addNum(int val) {
      method remove (line 112) | private Node remove(Node node, Interval inv) {
      method findMin (line 127) | private Node findMin(Node node) {
      method findNode (line 132) | private Node findNode(Node node, int val) {
      method addNode (line 138) | private Node addNode(Node node, int val) {
      method getIntervals (line 146) | public List<Interval> getIntervals() {
      method inorder (line 152) | private void inorder(Node node, List<Interval> res) {
    class Node (line 160) | class Node {
      method Node (line 164) | Node(Interval inv) {

FILE: src/DecodeString394.java
  class DecodeString394 (line 24) | public class DecodeString394 {
    method decodeString (line 25) | public String decodeString(String s) {
    method decodeString (line 61) | public Res decodeString(String s, int start) {
    class Res (line 100) | class Res {
      method Res (line 103) | Res (int next, String in) {
    method decodeString2 (line 113) | public String decodeString2(String s) {
    method decodeString3 (line 146) | public String decodeString3(String s) {

FILE: src/DecodeWays91.java
  class DecodeWays91 (line 23) | public class DecodeWays91 {
    method numDecodings (line 24) | public int numDecodings(String s) {
    method numDecodings2 (line 65) | public int numDecodings2(String s) {
    method numDecodings3 (line 84) | public int numDecodings3(String s) {
    method numDecodings4 (line 105) | public int numDecodings4(String s) {
    method numDecodings5 (line 127) | public int numDecodings5(String s) {

FILE: src/DecodeWaysII639.java
  class DecodeWaysII639 (line 34) | public class DecodeWaysII639 {
    method numDecodings (line 35) | public int numDecodings(String s) {
    method numDecodings2 (line 62) | public int numDecodings2(String s) {

FILE: src/DecodedStringAtIndex884.java
  class DecodedStringAtIndex884 (line 40) | public class DecodedStringAtIndex884 {
    method decodeAtIndex (line 41) | public String decodeAtIndex(String S, int K) {

FILE: src/DeleteAndEarn740.java
  class DeleteAndEarn740 (line 31) | public class DeleteAndEarn740 {
    method deleteAndEarn (line 32) | public int deleteAndEarn(int[] nums) {
    method deleteAndEarn2 (line 54) | public int deleteAndEarn2(int[] nums) {

FILE: src/DeleteNodeInABST450.java
  class DeleteNodeInABST450 (line 55) | public class DeleteNodeInABST450 {
    method deleteNode (line 56) | public TreeNode deleteNode(TreeNode root, int key) {
    method delete (line 72) | private TreeNode delete(TreeNode node) {
    method moveNext (line 78) | private TreeNode moveNext(TreeNode node) {
    method deleteNode2 (line 98) | public TreeNode deleteNode2(TreeNode root, int key) {
    method minValue (line 126) | private int minValue(TreeNode root) {

FILE: src/DeleteNodeInALinkedList237.java
  class DeleteNodeInALinkedList237 (line 19) | public class DeleteNodeInALinkedList237 {
    method deleteNode (line 20) | public void deleteNode(ListNode node) {

FILE: src/DesignCircularDeque641.java
  class DesignCircularDeque641 (line 36) | public class DesignCircularDeque641 {
    class MyCircularDeque (line 38) | class MyCircularDeque {
      method MyCircularDeque (line 44) | public MyCircularDeque(int k) {
      method insertFront (line 53) | public boolean insertFront(int value) {
      method insertLast (line 65) | public boolean insertLast(int value) {
      method deleteFront (line 77) | public boolean deleteFront() {
      method deleteLast (line 86) | public boolean deleteLast() {
      method dislink (line 94) | private void dislink(Node node) {
      method getFront (line 100) | public int getFront() {
      method getRear (line 106) | public int getRear() {
      method isEmpty (line 112) | public boolean isEmpty() {
      method isFull (line 117) | public boolean isFull() {
      class Node (line 121) | class Node {
        method Node (line 125) | Node(int value) {
    class MyCircularDeque2 (line 132) | class MyCircularDeque2 {
      method MyCircularDeque (line 139) | public MyCircularDeque(int k) {
      method insertFront (line 147) | public boolean insertFront(int value) {
      method insertLast (line 156) | public boolean insertLast(int value) {
      method deleteFront (line 164) | public boolean deleteFront() {
      method deleteLast (line 173) | public boolean deleteLast() {
      method getFront (line 180) | public int getFront() {
      method getRear (line 186) | public int getRear() {
      method isEmpty (line 192) | public boolean isEmpty() {
      method isFull (line 197) | public boolean isFull() {

FILE: src/DesignCircularQueue622.java
  class DesignCircularQueue622 (line 42) | public class DesignCircularQueue622 {
    class MyCircularQueue (line 44) | class MyCircularQueue {
      method MyCircularQueue (line 50) | public MyCircularQueue(int k) {
      method enQueue (line 59) | public boolean enQueue(int value) {
      method deQueue (line 71) | public boolean deQueue() {
      method dislink (line 78) | private void dislink(Node node) {
      method Front (line 84) | public int Front() {
      method Rear (line 90) | public int Rear() {
      method isEmpty (line 96) | public boolean isEmpty() {
      method isFull (line 101) | public boolean isFull() {
      class Node (line 105) | class Node {
        method Node (line 109) | Node() {
        method Node (line 112) | Node(int value) {
    class MyCircularQueue2 (line 119) | class MyCircularQueue2 {
      method MyCircularQueue (line 126) | public MyCircularQueue(int k) {
      method enQueue (line 134) | public boolean enQueue(int value) {
      method deQueue (line 142) | public boolean deQueue() {
      method Front (line 151) | public int Front() {
      method Rear (line 157) | public int Rear() {
      method isEmpty (line 163) | public boolean isEmpty() {
      method isFull (line 168) | public boolean isFull() {

FILE: src/DesignCompressedStringIterator604.java
  class DesignCompressedStringIterator604 (line 35) | public class DesignCompressedStringIterator604 {
    class StringIterator (line 37) | class StringIterator {
      method StringIterator (line 45) | public StringIterator(String compressedString) {
      method next (line 52) | public char next() {
      method hasNext (line 63) | public boolean hasNext() {
      method move (line 67) | private void move() {
      method isNumeric (line 78) | private boolean isNumeric(char c) {
    class StringIterator2 (line 88) | class StringIterator2 {
      method StringIterator (line 91) | public StringIterator(String s) {
      method next (line 101) | public char next() {
      method hasNext (line 108) | public boolean hasNext() {

FILE: src/DesignHashMap706.java
  class DesignHashMap706 (line 32) | public class DesignHashMap706 {
    class MyHashMap (line 33) | class MyHashMap {
      method MyHashMap (line 37) | public MyHashMap() {
      method put (line 41) | public void put(int key, int value) {
      method get (line 46) | public int get(int key) {
      method remove (line 52) | public void remove(int key) {
    class MyHashMap2 (line 58) | class MyHashMap2 {
      method MyHashMap (line 64) | public MyHashMap() {
      method put (line 68) | public void put(int key, int value) {
      method get (line 91) | public int get(int key) {
      method remove (line 107) | public void remove(int key) {
      class ListNode (line 128) | class ListNode {
        method ListNode (line 133) | ListNode (int key, int value) {
    class MyHashMap3 (line 141) | class MyHashMap3 {
      method MyHashMap (line 147) | public MyHashMap() {
      method put (line 151) | public void put(int key, int value) {
      method get (line 181) | public int get(int key) {
      method remove (line 205) | public void remove(int key) {
      method delete (line 210) | private TreeNode delete(TreeNode head, int key) {
      method minValue (line 231) | private int minValue(TreeNode head) {
      class TreeNode (line 240) | class TreeNode {
        method TreeNode (line 245) | TreeNode (int key, int value) {

FILE: src/DesignHashSet705.java
  class DesignHashSet705 (line 27) | public class DesignHashSet705 {
    class MyHashSet (line 29) | class MyHashSet {
      method MyHashSet (line 34) | public MyHashSet() {
      method add (line 38) | public void add(int key) {
      method remove (line 50) | public void remove(int key) {
      method contains (line 64) | public boolean contains(int key) {
    class MyHashSet2 (line 77) | class MyHashSet2 {
      method MyHashSet2 (line 82) | public MyHashSet2() {
      method add (line 86) | public void add(int key) {
      method addNode (line 91) | TreeNode addNode(TreeNode root, int key) {
      method remove (line 101) | public void remove(int key) {
      method removeNode (line 106) | TreeNode removeNode(TreeNode root, int key) {
      method findMin (line 125) | int findMin(TreeNode root) {
      method contains (line 133) | public boolean contains(int key) {
      method containNode (line 137) | boolean containNode(TreeNode root, int key) {
      class TreeNode (line 143) | class TreeNode {
        method TreeNode (line 147) | TreeNode(int key) {

FILE: src/DesignHitCounter362.java
  class DesignHitCounter362 (line 42) | public class DesignHitCounter362 {
    class HitCounter (line 43) | class HitCounter {
      method HitCounter (line 48) | public HitCounter() {
      method hit (line 53) | public void hit(int timestamp) {
      method getHits (line 60) | public int getHits(int timestamp) {
      method removeOldHits (line 65) | private void removeOldHits(int timestamp) {
    class HitCounter2 (line 73) | class HitCounter2 {
      method HitCounter (line 80) | public HitCounter() {
      method hit (line 85) | public void hit(int timestamp) {
      method getHits (line 94) | public int getHits(int timestamp) {
      method removeOldHits (line 100) | private void removeOldHits(int timestamp) {
      method bucketIndex (line 110) | private int bucketIndex(int timestamp) {
    class HitCounter3 (line 119) | class HitCounter3 {
      method HitCounter (line 123) | public HitCounter() {
      method hit (line 130) | public void hit(int timestamp) {
      method getHits (line 142) | public int getHits(int timestamp) {

FILE: src/DesignInMemoryFileSystem588.java
  class DesignInMemoryFileSystem588 (line 42) | public class DesignInMemoryFileSystem588 {
    class FileSystem (line 44) | class FileSystem {
      method FileSystem (line 47) | public FileSystem() {
      method ls (line 50) | public List<String> ls(String path) {
      method mkdir (line 54) | public void mkdir(String path) {
      method addContentToFile (line 58) | public void addContentToFile(String filePath, String content) {
      method readContentFromFile (line 62) | public String readContentFromFile(String filePath) {
      class Trie (line 66) | class Trie {
        method startPos (line 72) | private int startPos(String[] path) {
        method find (line 76) | List<String> find(String[] path) {
        method find (line 80) | List<String> find(String[] path, int i) {
        method addDir (line 98) | void addDir(String[] path) {
        method addDir (line 102) | void addDir(String[] path, int i) {
        method addFile (line 110) | void addFile(String[] path, String content) {
        method addFile (line 114) | void addFile(String[] path, int i, String content) {
        method retrieve (line 124) | String retrieve(String[] path) {
        method retrieve (line 128) | String retrieve(String[] path, int i) {

FILE: src/DesignLinkedList707.java
  class DesignLinkedList707 (line 41) | public class DesignLinkedList707 {
    class MyLinkedList (line 42) | class MyLinkedList {
      method MyLinkedList (line 46) | public MyLinkedList() {
      method get (line 51) | public int get(int index) {
      method addAtHead (line 63) | public void addAtHead(int val) {
      method addAtTail (line 70) | public void addAtTail(int val) {
      method addAtIndex (line 81) | public void addAtIndex(int index, int val) {
      method deleteAtIndex (line 95) | public void deleteAtIndex(int index) {
      class Node (line 106) | class Node {
        method Node (line 109) | Node (int x) {
    class MyLinkedList2 (line 117) | class MyLinkedList2 {
      method MyLinkedList (line 121) | public MyLinkedList() {
      method get (line 126) | public int get(int index) {
      method addAtHead (line 138) | public void addAtHead(int val) {
      method addAtTail (line 147) | public void addAtTail(int val) {
      method addAtIndex (line 160) | public void addAtIndex(int index, int val) {
      method deleteAtIndex (line 176) | public void deleteAtIndex(int index) {
      class Node (line 188) | class Node {
        method Node (line 192) | Node (int x) {

FILE: src/DesignLogStorageSystem635.java
  class DesignLogStorageSystem635 (line 41) | public class DesignLogStorageSystem635 {
    class LogSystem (line 42) | class LogSystem {
      method LogSystem (line 47) | public LogSystem() {
      method put (line 52) | public void put(int id, String timestamp) {
      method retrieve (line 56) | public List<Integer> retrieve(String s, String e, String gra) {
      method roundLeft (line 67) | private String roundLeft(String timestamp, String gra) {
      method roundLeft (line 72) | private String roundLeft(String timestamp, TimeUnit unit) {
      method plus (line 80) | private String plus(String timestamp, TimeUnit unit) {
      method roundRight (line 85) | private String roundRight(String timestamp, String gra) {
    type TimeUnit (line 92) | enum TimeUnit {
      method TimeUnit (line 102) | TimeUnit(int position, String chrono) {
    class LogSystem2 (line 112) | class LogSystem2 {
      method put (line 117) | public void put(int id, String timestamp) { timestamps.add(new Strin...
      method retrieve (line 119) | public List<Integer> retrieve(String s, String e, String gra) {

FILE: src/DesignSearchAutocompleteSystem642.java
  class DesignSearchAutocompleteSystem642 (line 82) | public class DesignSearchAutocompleteSystem642 {
    class AutocompleteSystem (line 84) | class AutocompleteSystem {
      method AutocompleteSystem (line 90) | public AutocompleteSystem(String[] sentences, int[] times) {
      method input (line 101) | public List<String> input(char c) {
      method getAllSents (line 130) | private void getAllSents(Trie t, PriorityQueue<String> pq) {
      method asciiOrder (line 142) | private int asciiOrder(String s1, String s2) {
      method charPos (line 158) | private int charPos(char ch) {
      class Trie (line 163) | class Trie {
        method add (line 167) | void add(String sen) {
        method add (line 171) | void add(char[] chars, int i) {
    class AutocompleteSystem2 (line 187) | class AutocompleteSystem2 {
      method AutocompleteSystem2 (line 199) | public AutocompleteSystem2(String[] sentences, int[] times) {
      method addNode (line 210) | private Node addNode(Node n, String s) {
      method addNode (line 214) | private Node addNode(Node n, char[] chars, int i) {
      method input (line 237) | public List<String> input(char c) {
      method next (line 269) | private Node next(Node n, char c) {
      method getAllSents (line 280) | private void getAllSents(Node n, PriorityQueue<String> pq) {
      class Node (line 291) | class Node {
        method Node (line 297) | Node (char c) {

FILE: src/DesignSnakeGame353.java
  class DesignSnakeGame353 (line 58) | public class DesignSnakeGame353 {
    class SnakeGame (line 60) | class SnakeGame {
      method SnakeGame (line 77) | public SnakeGame(int width, int height, int[][] food) {
      method move (line 96) | public int move(String direction) {
      method moveNextFood (line 119) | private void moveNextFood() {
      method isFood (line 125) | private boolean isFood(int nextX, int nextY) {
      class Node (line 130) | class Node {
        method Node (line 135) | Node(int i, int j) {

FILE: src/DesignTicTacToe348.java
  class DesignTicTacToe348 (line 56) | public class DesignTicTacToe348 {
    class TicTacToe (line 57) | class TicTacToe {
      method TicTacToe (line 69) | public TicTacToe(int n) {
      method move (line 94) | public int move(int row, int col, int player) {
    class TicTacToe2 (line 130) | class TicTacToe2 {
      method TicTacToe (line 137) | public TicTacToe(int n) {
      method move (line 150) | public int move(int row, int col, int player) {
    class TicTacToe3 (line 182) | class TicTacToe3 {
      method TicTacToe (line 183) | public TicTacToe(int n) {
      method move (line 187) | public int move(int row, int col, int player) {
    class TicTacToe4 (line 198) | class TicTacToe4 {
      method TicTacToe4 (line 206) | public TicTacToe4(int n) {
      method move (line 222) | public int move(int row, int col, int player) {

FILE: src/DesignTwitter355.java
  class DesignTwitter355 (line 46) | public class DesignTwitter355 {
    class Twitter (line 47) | class Twitter {
      method Twitter (line 53) | public Twitter() {
      method postTweet (line 57) | public void postTweet(int userId, int tweetId) {
      method getNewsFeed (line 68) | public List<Integer> getNewsFeed(int userId) {
      method follow (line 88) | public void follow(int followerId, int followeeId) {
      method unfollow (line 99) | public void unfollow(int followerId, int followeeId) {
      class User (line 106) | class User {
        method User (line 110) | User(int i) {
        method addTweet (line 114) | public void addTweet(int i, int ts) {
        method follow (line 121) | public void follow(int userId) {
        method unfollow (line 125) | public void unfollow(int userId) {
      class Tweet (line 132) | class Tweet {
        method Tweet (line 135) | Tweet(int i, int ts) {

FILE: src/DiagonalTraverse498.java
  class DiagonalTraverse498 (line 22) | public class DiagonalTraverse498 {
    method findDiagonalOrder (line 23) | public int[] findDiagonalOrder(int[][] matrix) {
    method next (line 39) | private int[] next(int[] pos, int M, int N) {
    method isEven (line 65) | private boolean isEven(int x) {

FILE: src/DiameterOfBinaryTree543.java
  class DiameterOfBinaryTree543 (line 30) | public class DiameterOfBinaryTree543 {
    method diameterOfBinaryTree (line 31) | public int diameterOfBinaryTree(TreeNode root) {
    method helper (line 35) | private int[] helper(TreeNode root) {

FILE: src/DifferentWaysToAddParentheses241.java
  class DifferentWaysToAddParentheses241 (line 27) | public class DifferentWaysToAddParentheses241 {
    method diffWaysToCompute (line 28) | public List<Integer> diffWaysToCompute(String input) {
    method cal (line 47) | private Integer cal(Integer int1, Integer int2, Character op) {

FILE: src/DivideTwoIntegers29.java
  class DivideTwoIntegers29 (line 7) | public class DivideTwoIntegers29 {
    method divide (line 8) | public int divide(int dividend, int divisor) {
    method helper (line 15) | public long helper(long dividend, long divisor) {

FILE: src/DominoAndTrominoTiling790.java
  class DominoAndTrominoTiling790 (line 27) | public class DominoAndTrominoTiling790 {
    method numTilings (line 31) | public int numTilings(int N) {
    method numTilings2 (line 44) | public int numTilings2(int N) {
    method numTilings3 (line 56) | public int numTilings3(int N) {
    method numTilings4 (line 68) | public int numTilings4(int N) {
    method numTilings5 (line 82) | public int numTilings5(int N) {
    method numTilings6 (line 99) | public int numTilings6(int N) {

FILE: src/EditDistance72.java
  class EditDistance72 (line 14) | public class EditDistance72 {
    method minDistance (line 16) | public int minDistance(String word1, String word2) {
    method minDistance2 (line 39) | public int minDistance2(String word1, String word2) {
    method minDistance3 (line 71) | public int minDistance3(String word1, String word2) {
    method main (line 94) | public static void main(String[] args) {

FILE: src/EmployeeFreeTime759.java
  class EmployeeFreeTime759 (line 45) | public class EmployeeFreeTime759 {
    method employeeFreeTime (line 46) | public List<Interval> employeeFreeTime(List<List<Interval>> schedule) {
    method employeeFreeTime2 (line 81) | public List<Interval> employeeFreeTime2(List<List<Interval>> schedule) {

FILE: src/EncodeAndDecodeStrings271.java
  class EncodeAndDecodeStrings271 (line 41) | public class EncodeAndDecodeStrings271 {
    class Codec (line 42) | public class Codec {
      method encode (line 45) | public String encode(List<String> strs) {
      method decode (line 54) | public List<String> decode(String s) {

FILE: src/EncodeAndDecodeTinyURL535.java
  class EncodeAndDecodeTinyURL535 (line 16) | public class EncodeAndDecodeTinyURL535 {
    class Codec (line 17) | public class Codec {
      method encode (line 31) | public String encode(String longUrl) {
      method decode (line 42) | public String decode(String shortUrl) {
    class Codec2 (line 48) | public class Codec2 {
      method encode (line 62) | public String encode(String longUrl) {
      method decode (line 79) | public String decode(String shortUrl) {

FILE: src/EqualTreePartition663.java
  class EqualTreePartition663 (line 56) | public class EqualTreePartition663 {
    method checkEqualTree (line 57) | public boolean checkEqualTree(TreeNode root) {
    method sum (line 63) | private int sum(TreeNode root, Set<Integer> set, boolean isRoot) {

FILE: src/EvaluateDivision399.java
  class EvaluateDivision399 (line 29) | public class EvaluateDivision399 {
    method calcEquation (line 30) | public double[] calcEquation(String[][] equations, double[] values, St...
    method dfs (line 49) | private double dfs(Map<String, Set<String>> graph, Map<String, Map<Str...
    method initGraph (line 71) | private void initGraph(String[][] equations, double[] values, Map<Stri...
    method addToValueMap (line 82) | private void addToValueMap(Map<String, Map<String, Double>> weights, S...
    method addToValueSet (line 88) | private void addToValueSet(Map<String, Set<String>> graph, String from...
    method calcEquation2 (line 95) | public double[] calcEquation2(String[][] equations, double[] values, S...
    class UnionFind (line 119) | class UnionFind {
      method find (line 122) | private Parent find(String A) {
      method union (line 133) | private void union(String A, String B, double times) {
    class Parent (line 152) | class Parent {
      method Parent (line 155) | Parent(String parent, Double times) {

FILE: src/EvaluateReversePolishNotation150.java
  class EvaluateReversePolishNotation150 (line 35) | public class EvaluateReversePolishNotation150 {
    method evalRPN (line 36) | public int evalRPN(String[] tokens) {

FILE: src/ExamRoom855.java
  class ExamRoom855 (line 35) | public class ExamRoom855 {
    class ExamRoom (line 36) | class ExamRoom {
      method ExamRoom (line 42) | public ExamRoom(int N) {
      method seat (line 61) | public int seat() {
      method leave (line 84) | public void leave(int p) {
      method sitPos (line 96) | private int sitPos(Range r) {
      method sitPos (line 100) | private int sitPos(int left, int right) {
      method dis (line 107) | private int dis(Range r) {
      method dis (line 111) | private int dis(int left, int right) {
    class Range (line 118) | class Range {
      method Range (line 121) | Range (int l, int r) {

FILE: src/ExclusiveTimeOfFunctions636.java
  class ExclusiveTimeOfFunctions636 (line 46) | public class ExclusiveTimeOfFunctions636 {
    method exclusiveTime (line 47) | public int[] exclusiveTime(int n, List<String> logs) {

FILE: src/ExpressionAddOperators282.java
  class ExpressionAddOperators282 (line 16) | public class ExpressionAddOperators282 {
    method addOperators (line 17) | public List<String> addOperators(String num, int target) {
    method helper (line 31) | private void helper(String num, int target, List<String> res, String s...
    method addOperators2 (line 51) | public List<String> addOperators2(String num, int target) {
    method dfs (line 66) | private void dfs(List<String> ret, char[] path, int len, long left, lo...

FILE: src/FindAllAnagramsInAString438.java
  class FindAllAnagramsInAString438 (line 30) | public class FindAllAnagramsInAString438 {
    method findAnagrams (line 31) | public List<Integer> findAnagrams(String s, String p) {
    method findAnagrams2 (line 63) | public List<Integer> findAnagrams2(String s, String p) {
    method compare (line 87) | private boolean compare(int[] map, int[] window) {
    method findAnagrams3 (line 98) | public List<Integer> findAnagrams3(String s, String p) {
    method findAnagrams4 (line 130) | public List<Integer> findAnagrams4(String s, String t) {
    method findAnagrams5 (line 167) | public List<Integer> findAnagrams5(String s, String p) {

FILE: src/FindAllNumbersDisappearedInAnArray448.java
  class FindAllNumbersDisappearedInAnArray448 (line 19) | public class FindAllNumbersDisappearedInAnArray448 {
    method findDisappearedNumbers (line 20) | public List<Integer> findDisappearedNumbers(int[] nums) {
    method swap (line 43) | private void swap(int[] nums, int i, int j) {

FILE: src/FindAnagramMappings760.java
  class FindAnagramMappings760 (line 26) | public class FindAnagramMappings760 {
    method anagramMappings (line 30) | public int[] anagramMappings(int[] A, int[] B) {

FILE: src/FindAndReplacePattern890.java
  class FindAndReplacePattern890 (line 29) | public class FindAndReplacePattern890 {
    method findAndReplacePattern (line 30) | public List<String> findAndReplacePattern(String[] words, String patte...
    method isPermutation (line 42) | public boolean isPermutation(char[] word, char[] pattern, int N) {
    method findAndReplacePattern2 (line 56) | public List<String> findAndReplacePattern2(String[] words, String patt...
    method encode (line 67) | public int encode(String s) {

FILE: src/FindBottomLeftTreeValue513.java
  class FindBottomLeftTreeValue513 (line 43) | public class FindBottomLeftTreeValue513 {
    method findBottomLeftValue (line 44) | public int findBottomLeftValue(TreeNode root) {
    method findBottomLeftValue2 (line 65) | public int findBottomLeftValue2(TreeNode root) {
    method helper (line 72) | private int helper(TreeNode node, int level, Map<Integer, Integer> lef...
    method findBottomLeftValue3 (line 83) | public int findBottomLeftValue3(TreeNode root) {
    method findBottomLeftValue (line 86) | public int findBottomLeftValue(TreeNode root, int depth, int[] res) {

FILE: src/FindCenterOfMassInA2DArray.java
  class FindCenterOfMassInA2DArray (line 6) | public class FindCenterOfMassInA2DArray {
    method findCenterOfMass (line 7) | public int[] findCenterOfMass(int[][] weightMap) {

FILE: src/FindDuplicateSubtrees652.java
  class FindDuplicateSubtrees652 (line 40) | public class FindDuplicateSubtrees652 {
    method findDuplicateSubtrees (line 41) | public List<TreeNode> findDuplicateSubtrees(TreeNode root) {
    method findDuplicates (line 49) | private String findDuplicates(TreeNode root, Map<String, Boolean> visi...

FILE: src/FindEventualSafeStates802.java
  class FindEventualSafeStates802 (line 32) | public class FindEventualSafeStates802 {
    method eventualSafeNodes (line 33) | public List<Integer> eventualSafeNodes(int[][] graph) {
    method checkTermial (line 46) | private boolean checkTermial(int[][] graph, int now, boolean[] visited...
    method eventualSafeNodes2 (line 62) | public List<Integer> eventualSafeNodes2(int[][] graph) {
    method dfs (line 74) | public boolean dfs(int node, int[] color, int[][] graph) {

FILE: src/FindKClosestElements658.java
  class FindKClosestElements658 (line 26) | public class FindKClosestElements658 {
    method findClosestElements (line 27) | public List<Integer> findClosestElements(int[] arr, int k, int x) {
    method binarySearch (line 51) | public int binarySearch(int[] arr, int x, int lo, int hi) {
    method updatePos (line 63) | private int updatePos(int[] arr, int x, int pos) {
    method findClosestElements3 (line 79) | public List<Integer> findClosestElements3(int[] arr, int k, int x) {
    method findClosestElements4 (line 115) | public List<Integer> findClosestElements4(int[] arr, int k, int x) {
    method binarySearch (line 142) | private int binarySearch(int[] arr, int x) {

FILE: src/FindKPairsWithSmallestSums373.java
  class FindKPairsWithSmallestSums373 (line 38) | public class FindKPairsWithSmallestSums373 {
    method kSmallestPairs (line 42) | public List<int[]> kSmallestPairs(int[] nums1, int[] nums2, int k) {
    method kSmallestPairs2 (line 59) | public List<int[]> kSmallestPairs2(int[] nums1, int[] nums2, int k) {
    class Pair (line 79) | class Pair{
      method Pair (line 83) | Pair(int idx, int n1, int n2){
    class CompPair (line 90) | class CompPair implements Comparator<Pair> {
      method compare (line 91) | public int compare(Pair p1, Pair p2){
    method kSmallestPairs3 (line 99) | public List<int[]> kSmallestPairs3(int[] nums1, int[] nums2, int k) {
    class Tuple (line 114) | class Tuple implements Comparable<Tuple> {
      method Tuple (line 116) | public Tuple (int x, int y, int val) {
      method compareTo (line 122) | @Override

FILE: src/FindKthSmallestPairDistance719.java
  class FindKthSmallestPairDistance719 (line 26) | public class FindKthSmallestPairDistance719 {
    method smallestDistancePair (line 27) | public int smallestDistancePair(int[] nums, int k) {
    method smallestDistancePair3 (line 49) | public int smallestDistancePair3(int[] nums, int k) {
    method count (line 67) | private int count(int[] nums, int x) {

FILE: src/FindLargestValueInEachTreeRow515.java
  class FindLargestValueInEachTreeRow515 (line 26) | public class FindLargestValueInEachTreeRow515 {
    method largestValues (line 27) | public List<Integer> largestValues(TreeNode root) {
    method largestValues2 (line 50) | public List<Integer> largestValues2(TreeNode root) {
    method helper (line 56) | private void helper(TreeNode root, List<Integer> res, int d){

FILE: src/FindMedianFromDataStream295.java
  class FindMedianFromDataStream295 (line 25) | public class FindMedianFromDataStream295 {
    class MedianFinder (line 26) | class MedianFinder {
      method MedianFinder (line 31) | public MedianFinder() {
      method addNum (line 35) | public void addNum(int num) {
      method findMedian (line 59) | public double findMedian() {
    class MedianFinder2 (line 71) | class MedianFinder2 {
      method MedianFinder (line 76) | public MedianFinder() {
      method addNum (line 81) | public void addNum(int num) {
      method findMedian (line 89) | public double findMedian() {
    class MedianFinder3 (line 104) | class MedianFinder3 {
      class TreeNode (line 105) | class TreeNode{
        method TreeNode (line 108) | TreeNode(int val, TreeNode p){
        method add (line 114) | void add(int num){
        method next (line 127) | TreeNode next(){
        method prev (line 141) | TreeNode prev(){
      method addNum (line 159) | public void addNum(int num) {
      method findMedian (line 177) | public double findMedian() {
    class MedianFinder4 (line 186) | class MedianFinder4 {
      method MedianFinder (line 191) | public MedianFinder() {
      method addNum (line 196) | public void addNum(int num) {
      method findMedian (line 211) | public double findMedian() {

FILE: src/FindMinimumInRotatedSortedArray153.java
  class FindMinimumInRotatedSortedArray153 (line 23) | public class FindMinimumInRotatedSortedArray153 {
    method findMin (line 24) | public int findMin(int[] nums) {
    method findMin (line 28) | public int findMin(int[] nums, int s, int e) {
    method findMin2 (line 35) | public int findMin2(int[] nums) {
    method findMin3 (line 50) | public int findMin3(int[] nums) {
    method findMin4 (line 68) | public int findMin4(int[] nums) {

FILE: src/FindMinimumInRotatedSortedArrayII154.java
  class FindMinimumInRotatedSortedArrayII154 (line 25) | public class FindMinimumInRotatedSortedArrayII154 {
    method findMin (line 26) | public int findMin(int[] nums) {
    method findMin2 (line 34) | public int findMin2(int[] nums) {
    method findMin (line 38) | private int findMin(int[] nums, int i, int j) {
    method findMin3 (line 46) | public int findMin3(int[] nums) {

FILE: src/FindModeInBinarySearchTree501.java
  class FindModeInBinarySearchTree501 (line 36) | public class FindModeInBinarySearchTree501 {
    method findMode (line 37) | public int[] findMode(TreeNode root) {
    method findMode (line 48) | private void findMode(TreeNode root, Result result) {
    class Result (line 79) | class Result {
      method Result (line 84) | Result() {
    method findMode2 (line 96) | public int[] findMode2(TreeNode root) {
    method handleValue (line 112) | private void handleValue(int val) {
    method inorder (line 128) | private void inorder(TreeNode root) {

FILE: src/FindPeakElement162.java
  class FindPeakElement162 (line 19) | public class FindPeakElement162 {
    method findPeakElement (line 20) | public int findPeakElement(int[] nums) {
    method findPeakElement2 (line 40) | public int findPeakElement2(int[] nums) {
    method findPeakElement3 (line 49) | public int findPeakElement3(int[] nums) {
    method search (line 52) | public int search(int[] nums, int l, int r) {
    method findPeakElement4 (line 62) | public int findPeakElement4(int[] nums) {

FILE: src/FindTheCelebrity277.java
  class FindTheCelebrity277 (line 24) | public class FindTheCelebrity277 {
    method findCelebrity (line 26) | public int findCelebrity(int n) {
    method findCelebrity2 (line 48) | public int findCelebrity2(int n) {
    method findCelebrity3 (line 77) | public int findCelebrity3(int n) {
    method findCelebrity4 (line 93) | public int findCelebrity4(int n) {
    method findCelebrity5 (line 102) | public int findCelebrity5(int n) {

FILE: src/FindTheDuplicateNumber287.java
  class FindTheDuplicateNumber287 (line 22) | public class FindTheDuplicateNumber287 {
    method findDuplicate (line 23) | public int findDuplicate(int[] nums) {
    method findDuplicate2 (line 37) | public int findDuplicate2(int[] nums) {

FILE: src/FirstBadVersion278.java
  class FirstBadVersion278 (line 20) | public class FirstBadVersion278 extends VersionControl {
    method firstBadVersion (line 22) | public int firstBadVersion(int n) {
    method firstBadVersion (line 26) | private int firstBadVersion(int i, int j) {
    method firstBadVersion2 (line 36) | public int firstBadVersion2(int n) {

FILE: src/FirstMissingPositive41.java
  class FirstMissingPositive41 (line 16) | public class FirstMissingPositive41 {
    method firstMissingPositive (line 17) | public int firstMissingPositive(int[] nums) {
    method firstMissingPositive2 (line 64) | public int firstMissingPositive2(int[] nums) {
    method firstMissingPositive3 (line 93) | public int firstMissingPositive3(int[] A) {
    method swap (line 105) | private void swap(int[] A, int i, int j){
    method firstMissingPositive4 (line 112) | public int firstMissingPositive4(int[] nums) {

FILE: src/FirstUniqueCharacterInAString387.java
  class FirstUniqueCharacterInAString387 (line 18) | public class FirstUniqueCharacterInAString387 {
    method firstUniqChar (line 19) | public int firstUniqChar(String s) {
    method firstUniqChar2 (line 52) | public int firstUniqChar2(String s) {
    method firstUniqChar3 (line 71) | public int firstUniqChar3(String s) {
    method firstUniqChar4 (line 97) | public static int firstUniqChar4(String s) {
    method firstUniqChar5 (line 107) | public int firstUniqChar5(String s) {
    method firstUniqChar6 (line 123) | public int firstUniqChar6(String s) {

FILE: src/FizzBuzz412.java
  class FizzBuzz412 (line 29) | public class FizzBuzz412 {
    method fizzBuzz (line 30) | public List<String> fizzBuzz(int n) {

FILE: src/Flatten2DVector251.java
  class Flatten2DVector251 (line 21) | public class Flatten2DVector251 {
    class Vector2D (line 22) | class Vector2D implements Iterator<Integer> {
      method Vector2D (line 26) | public Vector2D(List<List<Integer>> vec2d) {
      method next (line 35) | @Override
      method hasNext (line 41) | @Override

FILE: src/FlattenBinaryTreeToLinkedList114.java
  class FlattenBinaryTreeToLinkedList114 (line 37) | public class FlattenBinaryTreeToLinkedList114 {
    method flatten (line 38) | public void flatten(TreeNode root) {
    method flattenNode (line 42) | private TreeNode flattenNode(TreeNode root) {
    method flatten2 (line 67) | public void flatten2(TreeNode root) {
    method helper (line 71) | private TreeNode helper(TreeNode root) {
    method flatten3 (line 89) | public void flatten3(TreeNode root) {
    method flatten4 (line 107) | public void flatten4(TreeNode root) {
    method flatten (line 111) | private TreeNode flatten(TreeNode root, TreeNode pre) {
    method main (line 122) | public static void main(String[] args) {

FILE: src/FlipGame293.java
  class FlipGame293 (line 21) | public class FlipGame293 {
    method generatePossibleNextMoves (line 22) | public List<String> generatePossibleNextMoves(String s) {

FILE: src/FlippingAnImage832.java
  class FlippingAnImage832 (line 28) | public class FlippingAnImage832 {
    method flipAndInvertImage (line 29) | public int[][] flipAndInvertImage(int[][] A) {
    method flipAndInvertImage2 (line 41) | public int[][] flipAndInvertImage2(int[][] A) {
    method reverseAndFlip (line 48) | private void reverseAndFlip(int[] row) {
    method swapAndFlip (line 56) | private void swapAndFlip(int[] row, int i, int j) {

FILE: src/FourSum18.java
  class FourSum18 (line 22) | public class FourSum18 {
    method fourSum (line 23) | public List<List<Integer>> fourSum(int[] nums, int target) {
    method fourSum2 (line 58) | public List<List<Integer>> fourSum2(int[] num, int target) {
    method fourSum3 (line 94) | public List<List<Integer>> fourSum3(int[] nums, int target) {
    method kSum (line 99) | private ArrayList<List<Integer>> kSum(int[] nums, int target, int k, i...

FILE: src/FourSumII454.java
  class FourSumII454 (line 24) | public class FourSumII454 {
    method fourSumCount (line 25) | public int fourSumCount(int[] A, int[] B, int[] C, int[] D) {
    method invalid (line 48) | private boolean invalid(int[] arr) {
    method fourSumCount2 (line 53) | public int fourSumCount2(int[] A, int[] B, int[] C, int[] D) {

FILE: src/FractionToRecurringDecimal166.java
  class FractionToRecurringDecimal166 (line 16) | public class FractionToRecurringDecimal166 {
    method fractionToDecimal (line 17) | public String fractionToDecimal(int numerator, int denominator) {
    method fractionToDecimal2 (line 63) | public String fractionToDecimal2(int numerator, int denominator) {

FILE: src/FriendCircles547.java
  class FriendCircles547 (line 40) | public class FriendCircles547 {
    method findCircleNum (line 41) | public int findCircleNum(int[][] M) {
    method helper (line 55) | private void helper(int[][] M, boolean[] visited, int i) {

FILE: src/FrogJump403.java
  class FrogJump403 (line 42) | public class FrogJump403 {
    method canCross (line 43) | public boolean canCross(int[] stones) {

FILE: src/GameOfLife289.java
  class GameOfLife289 (line 29) | public class GameOfLife289 {
    method gameOfLife (line 30) | public void gameOfLife(int[][] board) {
    method countLive (line 54) | private int countLive(int[][] board, int x, int y) {
    method gameOfLife2 (line 71) | public void gameOfLife2(int[][] board) {
    method liveNeighbors (line 97) | public int liveNeighbors(int[][] board, int m, int n, int i, int j) {
    method gameOfLife3 (line 109) | public void gameOfLife3(int[][] board) {
    method update (line 124) | private void update(int[][] board, int i, int j, int M, int N) {
    method refresh (line 145) | private void refresh(int[][] board, int i, int j) {

FILE: src/GeneralizedAbbreviation320.java
  class GeneralizedAbbreviation320 (line 13) | public class GeneralizedAbbreviation320 {
    method generateAbbreviations (line 14) | public List<String> generateAbbreviations(String word) {
    method backtrace (line 23) | private void backtrace(char[] word, List<String> res, boolean prevIsWo...
    method generateAbbreviations2 (line 48) | public List<String> generateAbbreviations2(String word) {
    method abbr (line 56) | private String abbr(String word, int x) {

FILE: src/GenerateParentheses22.java
  class GenerateParentheses22 (line 20) | public class GenerateParentheses22 {
    method generateParenthesis (line 21) | public List<String> generateParenthesis(int n) {
    method addOnePair (line 34) | private List<String> addOnePair(List<String> source, Integer n) {
    method generateParenthesis2 (line 51) | public List<String> generateParenthesis2(int n) {
    method backtrack (line 57) | private void backtrack(List<String> list, String str, int open, int cl...
    method generateParenthesis3 (line 75) | public List<String> generateParenthesis3(int n) {
    method helper (line 81) | private void helper(List<String> res, StringBuilder sb, int open, int ...
    method main (line 100) | public static void main(String[] args) {

FILE: src/GraphValidTree261.java
  class GraphValidTree261 (line 18) | public class GraphValidTree261 {
    method validTree (line 22) | public boolean validTree(int n, int[][] edges) {
    method isValid (line 37) | private boolean isValid(Map<Integer, Set<Integer>> graph, boolean[] vi...
    method constructGraph (line 50) | private Map<Integer, Set<Integer>> constructGraph(int n, int[][] edges) {
    method validTree2 (line 63) | public boolean validTree2(int n, int[][] edges) {
    class DisjointSet (line 78) | class DisjointSet {
      method DisjointSet (line 82) | public DisjointSet(int n) {
      method find (line 88) | public int find(int x) {
      method union (line 95) | public void union(int x, int y) {
    method validTree3 (line 113) | public boolean validTree3(int n, int[][] edges) {
    method find (line 134) | int find(int nums[], int i) {

FILE: src/GroupAnagrams49.java
  class GroupAnagrams49 (line 15) | public class GroupAnagrams49 {
    method groupAnagrams (line 16) | public List<List<String>> groupAnagrams(String[] strs) {
    method getSortedString (line 29) | private String getSortedString(String s) {
    method groupAnagrams2 (line 38) | public static List<List<String>> groupAnagrams2(String[] strs) {

FILE: src/GroupShiftedStrings249.java
  class GroupShiftedStrings249 (line 21) | public class GroupShiftedStrings249 {
    method groupStrings (line 22) | public List<List<String>> groupStrings(String[] strings) {
    method getDiff (line 50) | private int getDiff(char c1, char c2) {
    method groupStrings2 (line 61) | public List<List<String>> groupStrings2(String[] strings) {

FILE: src/GuessNumberHigherOrLowerII375.java
  class GuessNumberHigherOrLowerII375 (line 25) | public class GuessNumberHigherOrLowerII375 {
    method getMoneyAmount (line 46) | public int getMoneyAmount(int n) {
    method getMoneyAmount (line 50) | public int getMoneyAmount(int l, int r, int[][] memo) {
    method getMoneyAmount2 (line 64) | public int getMoneyAmount2(int n) {
    method getMoneyAmount3 (line 82) | public int getMoneyAmount3(int n) {

FILE: src/GuessTheWord843.java
  class GuessTheWord843 (line 47) | public class GuessTheWord843 {
    method findSecretWord (line 51) | public void findSecretWord(String[] wordlist, Master master) {
    method match (line 61) | public int match(String a, String b) {
    method findSecretWord2 (line 71) | public void findSecretWord2(String[] wordlist, Master master) {
    class Pair (line 84) | class Pair {
      method Pair (line 87) | Pair (String s, Integer i) {

FILE: src/HIndex274.java
  class HIndex274 (line 19) | public class HIndex274 {
    method hIndex (line 20) | public int hIndex(int[] citations) {
    method hIndex2 (line 42) | public int hIndex2(int[] citations) {
    method hIndex3 (line 59) | public int hIndex3(int[] citations) {
    method hIndex4 (line 99) | public int hIndex4(int[] citations) {
    method hIndex5 (line 129) | public int hIndex5(int[] citations) {
    method hIndex6 (line 141) | public int hIndex6(int[] citations) {
    method hIndex7 (line 154) | public int hIndex7(int[] citations) {

FILE: src/HandOfStraights846.java
  class HandOfStraights846 (line 25) | public class HandOfStraights846 {
    method isNStraightHand (line 26) | public boolean isNStraightHand(int[] hand, int W) {
    method isNStraightHand2 (line 51) | public boolean isNStraightHand2(int[] hand, int W) {
    method isNStraightHand3 (line 77) | public boolean isNStraightHand3(int[] hands, int W) {

FILE: src/HappyNumber202.java
  class HappyNumber202 (line 21) | public class HappyNumber202 {
    method isHappy (line 22) | public boolean isHappy(int n) {
    method next (line 35) | private int next(int n) {
    method isHappy2 (line 49) | public boolean isHappy2(int n) {
    method digitSquareSum (line 61) | private int digitSquareSum(int n) {

FILE: src/HighestPopulationYear.java
  class HighestPopulationYear (line 9) | public class HighestPopulationYear {
    method find (line 12) | public static int find(int[][] people) {
    method find2 (line 37) | public static int find2(int[][] people) {
    method find3 (line 62) | public static int find3(int[][] people) {
    method main (line 91) | public static void main(String[] args) {

FILE: src/HouseRobber198.java
  class HouseRobber198 (line 14) | public class HouseRobber198 {
    method rob (line 15) | public int rob(int[] nums) {
    method rob2 (line 36) | public int rob2(int[] nums) {

FILE: src/HouseRobberII213.java
  class HouseRobberII213 (line 16) | public class HouseRobberII213 {
    method rob (line 17) | public int rob(int[] nums) {
    method rob2 (line 38) | public int rob2(int[] nums) {
    method rob (line 43) | private int rob(int[] num, int lo, int hi) {
    method rob3 (line 54) | public int rob3(int[] nums) {
    method rob3 (line 61) | public int rob3(int[] nums, int i, int j) {

FILE: src/HouseRobberIII337.java
  class HouseRobberIII337 (line 43) | public class HouseRobberIII337 {
    method rob (line 44) | public int rob(TreeNode root) {
    method helper (line 48) | private DP helper(TreeNode root) {
    class DP (line 65) | class DP {
      method DP (line 68) | DP(Integer last, Integer prev) {
    method rob2 (line 75) | public int rob2(TreeNode root) {
    method helper2 (line 80) | public int[] helper2(TreeNode root) {

FILE: src/ImageSmoother661.java
  class ImageSmoother661 (line 29) | public class ImageSmoother661 {
    method imageSmoother (line 31) | public int[][] imageSmoother(int[][] M) {

FILE: src/ImplementMagicDictionary676.java
  class ImplementMagicDictionary676 (line 28) | public class ImplementMagicDictionary676 {
    class MagicDictionary (line 30) | class MagicDictionary {
      method MagicDictionary (line 34) | public MagicDictionary() {
      method buildDict (line 38) | public void buildDict(String[] dict) {
      method search (line 45) | public boolean search(String word) {
      class Trie (line 49) | class Trie {
        method add (line 53) | void add(String word) {
        method add (line 58) | void add(char[] word, int i) {
        method search (line 69) | boolean search(String word) {
        method search (line 74) | boolean search(char[] word, int start, boolean modified) {
    class MagicDictionary2 (line 97) | class MagicDictionary2 {
      method MagicDictionary (line 99) | public MagicDictionary() {
      method buildDict (line 103) | public void buildDict(String[] words) {
      method search (line 109) | public boolean search(String word) {
    class MagicDictionary3 (line 128) | public class MagicDictionary3 {
      method MagicDictionary (line 132) | public MagicDictionary() {
      method generalizedNeighbors (line 137) | private ArrayList<String> generalizedNeighbors(String word) {
      method buildDict (line 150) | public void buildDict(String[] words) {
      method search (line 159) | public boolean search(String word) {

FILE: src/ImplementQueueUsingStacks232.java
  class ImplementQueueUsingStacks232 (line 31) | public class ImplementQueueUsingStacks232 {
    class MyQueue (line 33) | class MyQueue {
      method MyQueue (line 37) | public MyQueue() {
      method push (line 42) | public void push(int x) {
      method pop (line 55) | public int pop() {
      method peek (line 60) | public int peek() {
      method empty (line 65) | public boolean empty() {

FILE: src/ImplementStackusingQueues225.java
  class ImplementStackUsingQueues225 (line 20) | public class ImplementStackUsingQueues225 {
    class MyStack (line 22) | public class MyStack {
      method MyStack (line 28) | public MyStack() {
      method push (line 33) | public void push(int x) {
      method pop (line 47) | public int pop() {
      method top (line 66) | public int top() {
      method empty (line 71) | public boolean empty() {
    class MyStack2 (line 77) | public class MyStack2 {
      method MyStack (line 82) | public MyStack() {
      method push (line 87) | public void push(int x) {
      method pop (line 97) | public int pop() {
      method top (line 102) | public int top() {
      method empty (line 107) | public boolean empty() {

FILE: src/ImplementStrStr28.java
  class ImplementStrStr28 (line 18) | public class ImplementStrStr28 {
    method strStr (line 19) | public int strStr(String haystack, String needle) {
    method strStr2 (line 42) | public int strStr2(String haystack, String needle) {

FILE: src/ImplementTriePrefixTree208.java
  class ImplementTriePrefixTree208 (line 21) | public class ImplementTriePrefixTree208 {
    class Trie (line 23) | class Trie {
      method Trie (line 29) | public Trie() {
      method insert (line 34) | public void insert(String word) {
      method insert (line 38) | private void insert(char[] chars, int i) {
      method search (line 50) | public boolean search(String word) {
      method search (line 54) | private boolean search(char[] chars, int i) {
      method startsWith (line 61) | public boolean startsWith(String prefix) {
      method startsWith (line 65) | private boolean startsWith(char[] chars, int i) {
    class Trie2 (line 77) | class Trie2 {
      method Trie (line 81) | public Trie() {
      method insert (line 86) | public void insert(String word) {
      method search (line 99) | public boolean search(String word) {
      method startsWith (line 112) | public boolean startsWith(String prefix) {
    class TrieNode (line 125) | class TrieNode {
      method TrieNode (line 133) | public TrieNode() {
      method containsKey (line 137) | public boolean containsKey(char c) {
      method get (line 140) | public TrieNode get(char c) {
      method put (line 143) | public void put(char c, TrieNode node) {
      method setLeaf (line 146) | public void setLeaf() {
      method isLeaf (line 149) | public boolean isLeaf() {

FILE: src/IncreasingSubsequences491.java
  class IncreasingSubsequences491 (line 17) | public class IncreasingSubsequences491 {
    method findSubsequences (line 18) | public List<List<Integer>> findSubsequences(int[] nums) {
    method helper (line 24) | private void helper(int[] nums, int pre, int start, List<Integer> path...

FILE: src/IncreasingTripletSubsequence334.java
  class IncreasingTripletSubsequence334 (line 19) | public class IncreasingTripletSubsequence334 {
    method increasingTriplet (line 20) | public boolean increasingTriplet(int[] nums) {
    method increasingTriplet2 (line 32) | public boolean increasingTriplet2(int[] nums) {
    method increasingTriplet3 (line 52) | public boolean increasingTriplet3(int[] nums) {

FILE: src/InorderSuccessorInBST285.java
  class InorderSuccessorInBST285 (line 18) | public class InorderSuccessorInBST285 {
    method inorderSuccessor (line 20) | public TreeNode inorderSuccessor(TreeNode root, TreeNode p) {
    method findMin (line 37) | private TreeNode findMin(TreeNode n) {
    method inorderSuccessor2 (line 46) | public TreeNode inorderSuccessor2(TreeNode root, TreeNode x) {
    method inorderSuccessor2 (line 52) | public TreeNode inorderSuccessor2(TreeNode root, TreeNode x, TreeNode ...
    method inorderSuccessor3 (line 62) | public TreeNode inorderSuccessor3(TreeNode root, TreeNode p) {
    method inorderSuccessor3 (line 66) | public TreeNode inorderSuccessor3(TreeNode root, TreeNode p, TreeNode ...
    method inorderSuccessor4 (line 84) | public TreeNode inorderSuccessor4(TreeNode root, TreeNode p) {

FILE: src/InsertDeleteGetRandomOOne380.java
  class InsertDeleteGetRandomOOne380 (line 39) | public class InsertDeleteGetRandomOOne380 {
    class RandomizedSet (line 40) | public class RandomizedSet {
      method RandomizedSet (line 45) | public RandomizedSet() {
      method insert (line 51) | public boolean insert(int val) {
      method remove (line 56) | public boolean remove(int val) {
      method getRandom (line 61) | public int getRandom() {
    class RandomizedSet2 (line 67) | public class RandomizedSet2 {
      method RandomizedSet (line 74) | public RandomizedSet() {
      method insert (line 81) | public boolean insert(int val) {
      method remove (line 89) | public boolean remove(int val) {
      method getRandom (line 107) | public int getRandom() {
    class RandomizedSet3 (line 113) | class RandomizedSet3 {
      method RandomizedSet (line 121) | public RandomizedSet() {
      method insert (line 126) | public boolean insert(int val) {
      method remove (line 141) | public boolean remove(int val) {
      method getRandom (line 150) | public int getRandom() {

FILE: src/InsertInterval57.java
  class InsertInterval57 (line 30) | public class InsertInterval57 {
    method insert (line 31) | public List<Interval> insert(List<Interval> intervals, Interval newInt...
    method main (line 62) | public static void main(String[] args) {

FILE: src/InsertIntoACyclicSortedList.java
  class InsertIntoACyclicSortedList (line 43) | public class InsertIntoACyclicSortedList {
    method insert (line 44) | public Node insert(Node head, int insertVal) {
    method insert2 (line 71) | public Node insert2(Node head, int insertVal) {

FILE: src/InsertionSortList147.java
  class InsertionSortList147 (line 14) | public class InsertionSortList147 {
    method insertionSortList (line 15) | public ListNode insertionSortList(ListNode head) {
    method insert (line 37) | private void insert(ListNode dummy, ListNode newNode) {
    method insertionSortList2 (line 55) | public ListNode insertionSortList2(ListNode head) {

FILE: src/IntegerBreak343.java
  class IntegerBreak343 (line 18) | public class IntegerBreak343 {
    method integerBreak (line 19) | public int integerBreak(int n) {
    method integerBreak2 (line 38) | public int integerBreak2(int n) {

FILE: src/IntegerToEnglishWords273.java
  class IntegerToEnglishWords273 (line 12) | public class IntegerToEnglishWords273 {
    method numberToWords (line 21) | public String numberToWords(int num) {
    method threeDigits (line 38) | private String threeDigits(int num) {
    method twoDigits (line 47) | private String twoDigits(int num) {

FILE: src/IntegerToRoman12.java
  class IntegerToRoman12 (line 54) | public class IntegerToRoman12 {
    method intToRoman (line 57) | public String intToRoman(int num) {
    method curr (line 72) | private char[] curr(int digit, int base) {
    method intToRoman2 (line 95) | public static String intToRoman2(int num) {

FILE: src/InterleavingString97.java
  class InterleavingString97 (line 18) | public class InterleavingString97 {
    class Pair (line 20) | class Pair {
      method Pair (line 24) | Pair(int i, int j, int k) {
    method isInterleave (line 31) | public boolean isInterleave(String s1, String s2, String s3) {
    method isInterleave2 (line 71) | public boolean isInterleave2(String s1, String s2, String s3) {
    method isInterleave3 (line 102) | public boolean isInterleave3(String s1, String s2, String s3) {
    method isInterleave4 (line 144) | public boolean isInterleave4(String s1, String s2, String s3) {
    method dfs (line 151) | public boolean dfs(char[] c1, char[] c2, char[] c3, int i, int j, int ...

FILE: src/IntersectionOfTwoArrays349.java
  class IntersectionOfTwoArrays349 (line 15) | public class IntersectionOfTwoArrays349 {
    method intersection (line 17) | public static int[] intersection(int[] nums1, int[] nums2) {
    method intersection2 (line 46) | public int[] intersection2(int[] nums1, int[] nums2) {

FILE: src/IntersectionOfTwoArraysII350.java
  class IntersectionOfTwoArraysII350 (line 20) | public class IntersectionOfTwoArraysII350 {
    method intersect (line 21) | public int[] intersect(int[] nums1, int[] nums2) {
    method intersect2 (line 58) | public int[] intersect2(int[] nums1, int[] nums2) {
    method intersect3 (line 81) | public int[] intersect3(int[] nums1, int[] nums2) {

FILE: src/IntersectionOfTwoLinkedLists160.java
  class IntersectionOfTwoLinkedLists160 (line 35) | public class IntersectionOfTwoLinkedLists160 {
    method getIntersectionNode (line 36) | public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
    method getIntersectionNode2 (line 69) | public ListNode getIntersectionNode2(ListNode headA, ListNode headB) {
    method getIntersectionNode3 (line 112) | public ListNode getIntersectionNode3(ListNode headA, ListNode headB) {
    method getIntersectionNode4 (line 130) | public ListNode getIntersectionNode4(ListNode headA, ListNode headB) {

FILE: src/Interval.java
  class Interval (line 5) | public class Interval {
    method Interval (line 8) | Interval() { start = 0; end = 0; }
    method Interval (line 9) | Interval(int s, int e) { start = s; end = e; }

FILE: src/InvertBinaryTree226.java
  class InvertBinaryTree226 (line 30) | public class InvertBinaryTree226 {
    method invertTree (line 31) | public TreeNode invertTree(TreeNode root) {

FILE: src/IsGraphBipartite785.java
  class IsGraphBipartite785 (line 43) | public class IsGraphBipartite785 {
    method isBipartite (line 44) | public boolean isBipartite(int[][] graph) {
    method helper (line 54) | private boolean helper(int[][] graph, int curr, int[] visited, int pre) {
    method isBipartite2 (line 67) | public boolean isBipartite2(int[][] graph) {
    method isBipartite3 (line 97) | public boolean isBipartite3(int[][] graph) {
    method findParent (line 118) | private int findParent(int[]parent, int p){

FILE: src/IsSubsequence392.java
  class IsSubsequence392 (line 27) | public class IsSubsequence392 {
    method isSubsequence (line 28) | public boolean isSubsequence(String s, String t) {
    method isSubsequence2 (line 52) | public boolean isSubsequence2(String s, String t) {
    method isSubsequence3 (line 64) | public boolean isSubsequence3(String s, String t) {

FILE: src/IslandPerimeter463.java
  class IslandPerimeter463 (line 24) | public class IslandPerimeter463 {
    method islandPerimeter (line 26) | public int islandPerimeter(int[][] grid) {
    method perimeter (line 39) | private int perimeter(int[][] grid, int i, int j, int n, int m) {
    method islandPerimeter2 (line 55) | public int islandPerimeter2(int[][] grid) {

FILE: src/IsomorphicStrings205.java
  class IsomorphicStrings205 (line 26) | public class IsomorphicStrings205 {
    method isIsomorphic (line 27) | public boolean isIsomorphic(String s, String t) {
    method isIsomorphic2 (line 50) | public boolean isIsomorphic2(String s1, String s2) {
    method isIsomorphic3 (line 60) | public boolean isIsomorphic3(String sString, String tString) {
    method isIsomorphic4 (line 86) | public boolean isIsomorphic4(String sString, String tString) {
    method encode (line 90) | private int encode(char[] chars) {

FILE: src/JewelsAndStones771.java
  class JewelsAndStones771 (line 24) | public class JewelsAndStones771 {
    method numJewelsInStones (line 25) | public int numJewelsInStones(String J, String S) {

FILE: src/JudgeRouteCircle657.java
  class JudgeRouteCircle657 (line 21) | public class JudgeRouteCircle657 {
    method judgeCircle (line 22) | public boolean judgeCircle(String s) {

FILE: src/JumpGame55.java
  class JumpGame55 (line 17) | public class JumpGame55 {
    method canJump (line 18) | public boolean canJump(int[] nums) {
    method canJump2 (line 43) | public boolean canJump2(int[] nums) {
    method canJumpHelper (line 47) | boolean canJumpHelper(int A[], int n) {
    method canJump3 (line 59) | public boolean canJump3(int[] A) {
    method canJump4 (line 72) | public boolean canJump4(int[] nums) {

FILE: src/JumpGameII45.java
  class JumpGameII45 (line 19) | public class JumpGameII45 {
    method jump (line 20) | public int jump(int[] nums) {
    method jump2 (line 38) | public int jump2(int[] A) {

FILE: src/KEmptySlots683.java
  class KEmptySlots683 (line 36) | public class KEmptySlots683 {
    method kEmptySlots (line 37) | public int kEmptySlots(int[] flowers, int k) {
    method kEmptySlots2 (line 75) | public int kEmptySlots2(int[] flowers, int k) {

FILE: src/KMP.java
  class KMP (line 5) | public class KMP {
    method find (line 10) | public static int find(String txt, String pat, int[] next) {
    method getNext (line 27) | public static int[] getNext(String pat) {
    method main (line 46) | public static void main(String[] args) {

FILE: src/KeysAndRooms841.java
  class KeysAndRooms841 (line 36) | public class KeysAndRooms841 {
    method canVisitAllRooms (line 37) | public boolean canVisitAllRooms(List<List<Integer>> rooms) {
    method canVisitAllRooms2 (line 63) | public boolean canVisitAllRooms2(List<List<Integer>> rooms) {
    method enterRoom (line 68) | private void enterRoom(int roomId, List<List<Integer>> rooms) {

FILE: src/KillProcess582.java
  class KillProcess582 (line 38) | public class KillProcess582 {
    method killProcess (line 39) | public List<Integer> killProcess(List<Integer> pid, List<Integer> ppid...
    method constructTree (line 46) | private TreeNode constructTree(List<Integer> pid, List<Integer> ppid) {
    method findNode (line 79) | private void findNode(TreeNode root, int kill, List<Integer> res) {
    method gatherResults (line 94) | private void gatherResults(TreeNode found, List<Integer> res) {
    class TreeNode (line 102) | class TreeNode {
      method TreeNode (line 105) | TreeNode(int x) {
    method killProcess2 (line 111) | public List<Integer> killProcess2(List<Integer> pid, List<Integer> ppi...
    method findKill (line 118) | private TreeNode findKill(List<Integer> pid, List<Integer> ppid, int k...
    class Node (line 155) | class Node {
    method killProcess3 (line 159) | public List < Integer > killProcess3(List < Integer > pid, List < Inte...
    method getAllChildren (line 177) | public void getAllChildren(Node pn, List < Integer > l) {
    method killProcess4 (line 188) | public List<Integer> killProcess4(List<Integer> pid, List<Integer> ppi...
    method traverse (line 207) | private void traverse(Map<Integer, Set<Integer>> tree, List<Integer> r...
    method killProcess5 (line 222) | public List < Integer > killProcess5(List < Integer > pid, List < Inte...

FILE: src/KokoEatingBananas875.java
  class KokoEatingBananas875 (line 33) | public class KokoEatingBananas875 {
    method minEatingSpeed (line 34) | public int minEatingSpeed(int[] piles, int H) {
    method countHours (line 46) | private int countHours(int[] piles, int K) {

FILE: src/KthLargestElementInAnArray215.java
  class KthLargestElementInAnArray215 (line 13) | public class KthLargestElementInAnArray215 {
    method findKthLargest (line 14) | public int findKthLargest(int[] nums, int k) {
    method findKthLargest2 (line 22) | public int findKthLargest2(int[] nums, int k) {
    method findKthLargest3 (line 38) | public int findKthLargest3(int[] nums, int k) {
    method partition (line 56) | private int partition(int[] a, int lo, int hi) {
    method exch (line 72) | private void exch(int[] a, int i, int j) {
    method less (line 78) | private boolean less(int v, int w) {
    method findKthLargest4 (line 85) | public int findKthLargest4(int[] nums, int k) {
    method shuffle (line 104) | private void shuffle(int a[]) {
    method findKthLargest5 (line 113) | public int findKthLargest5(int[] nums, int k) {
    method count (line 134) | private int count(int[] nums, int mid) {
    method findKthLargest6 (line 142) | public int findKthLargest6(int[] nums, int k) {
    method partition2 (line 160) | private int partition2(int[] nums, int lo, int hi) {
    method swap (line 176) | private void swap(int[] nums, int i, int j) {

FILE: src/KthSmallestElementInABST230.java
  class KthSmallestElementInABST230 (line 26) | public class KthSmallestElementInABST230 {
    method kthSmallest (line 27) | public int kthSmallest(TreeNode root, int k) {
    method kthSmallest (line 33) | public void kthSmallest(TreeNode root, int k, Stack<Integer> st) {
    method kthSmallest2 (line 46) | public int kthSmallest2(TreeNode root, int k) {
    method kthSmallest (line 52) | public void kthSmallest(TreeNode root, int k, int[] i) {
    method kthSmallest3 (line 64) | public int kthSmallest3(TreeNode root, int k) {
    method kth (line 75) | public int kth(TreeNode root) {

FILE: src/KthSmallestElementInASortedMatrix378.java
  class KthSmallestElementInASortedMatrix378 (line 25) | public class KthSmallestElementInASortedMatrix378 {
    method kthSmallest (line 41) | public int kthSmallest(int[][] matrix, int k) {
    method kthSmallest2 (line 69) | public int kthSmallest2(int[][] matrix, int k) {
    class Tuple (line 81) | class Tuple implements Comparable<Tuple> {
      method Tuple (line 83) | public Tuple (int x, int y, int val) {
      method compareTo (line 89) | @Override

FILE: src/KthSmallestPrimeFraction786.java
  class KthSmallestPrimeFraction786 (line 28) | public class KthSmallestPrimeFraction786 {
    method kthSmallestPrimeFraction (line 29) | public int[] kthSmallestPrimeFraction(int[] A, int K) {
    method kthSmallestPrimeFraction2 (line 65) | public int[] kthSmallestPrimeFraction2(int[] a, int k) {
    method kthSmallestPrimeFraction3 (line 96) | public int[] kthSmallestPrimeFraction3(int[] A, int K) {

FILE: src/KthSymbolInGrammar779.java
  class KthSymbolInGrammar779 (line 33) | public class KthSymbolInGrammar779 {
    method kthGrammar (line 34) | public int kthGrammar(int N, int K) {

FILE: src/LFUCache460.java
  class LFUCache460 (line 31) | public class LFUCache460 {
    class LFUCache (line 32) | class LFUCache {
      method LFUCache (line 39) | public LFUCache(int capacity) {
      method get (line 43) | public int get(int key) {
      method deleteFromList (line 52) | private void deleteFromList(Node node) {
      method addToListEnd (line 57) | private void addToListEnd(Node head, Node node) {
      method addOnTreeMap (line 64) | private void addOnTreeMap(Node node) {
      method deleteFromTreeMap (line 73) | private void deleteFromTreeMap(Node node) {
      method put (line 81) | public void put(int key, int value) {
      method newHead (line 103) | private Node newHead() {
      class Node (line 110) | class Node {
        method Node (line 116) | Node(int key, int val, int freq) {
    class LFUCache2 (line 125) | class LFUCache2 {
      method LFUCache (line 131) | public LFUCache(int capacity) {
      method get (line 138) | public int get(int key) {
      method updateNodeFreq (line 145) | private void updateNodeFreq(ItemNode item) {
      method itemNodeIsEmpty (line 163) | private boolean itemNodeIsEmpty(ItemNode node) {
      method removeNode (line 167) | private void removeNode(FreqNode node) {
      method removeNode (line 172) | private void removeNode(ItemNode node) {
      method dislinkNode (line 177) | private void dislinkNode(FreqNode node) {
      method dislinkNode (line 182) | private void dislinkNode(ItemNode node) {
      method addAfter (line 187) | private void addAfter(FreqNode currNode, FreqNode newNode) {
      method addAfter (line 194) | private void addAfter(ItemNode currNode, ItemNode newNode) {
      method addBefore (line 201) | private void addBefore(ItemNode currNode, ItemNode newNode) {
      method put (line 208) | public void put(int key, int value) {
      method newItemHead (line 237) | private ItemNode newItemHead() {
      class ItemNode (line 244) | class ItemNode {
        method ItemNode (line 250) | ItemNode(int key, int val, int freq) {
        method ItemNode (line 255) | ItemNode() {
      class FreqNode (line 262) | class FreqNode {
        method FreqNode (line 267) | FreqNode(int freq) {
        method FreqNode (line 271) | FreqNode() {

FILE: src/LRUCache146.java
  class LRUCache (line 41) | public class LRUCache {
    class Node (line 42) | private class Node{
      method Node (line 45) | Node(int k, int v){
      method Node (line 49) | Node(){
    method LRUCache (line 57) | public LRUCache(int capacity) {
    method get (line 66) | public int get(int key) {
    method put (line 75) | public void put(int key, int value) {
    method update (line 93) | private void update(Node node){
    method add (line 97) | private void add(Node node){
    method remove (line 105) | private void remove(Node node){
    method LRUCache (line 126) | public LRUCache(int capacity) {
    method get (line 136) | public int get(int key) {
    method put (line 146) | public void put(int key, int value) {
  class LRUCache (line 122) | public class LRUCache {
    class Node (line 42) | private class Node{
      method Node (line 45) | Node(int k, int v){
      method Node (line 49) | Node(){
    method LRUCache (line 57) | public LRUCache(int capacity) {
    method get (line 66) | public int get(int key) {
    method put (line 75) | public void put(int key, int value) {
    method update (line 93) | private void update(Node node){
    method add (line 97) | private void add(Node node){
    method remove (line 105) | private void remove(Node node){
    method LRUCache (line 126) | public LRUCache(int capacity) {
    method get (line 136) | public int get(int key) {
    method put (line 146) | public void put(int key, int value) {

FILE: src/LargestBSTSubtree333.java
  class LargestBSTSubtree333 (line 34) | public class LargestBSTSubtree333 {
    method largestBSTSubtree (line 35) | public int largestBSTSubtree(TreeNode root) {
    method helper (line 40) | public int[] helper(TreeNode root) {

FILE: src/LargestDivisibleSubset368.java
  class LargestDivisibleSubset368 (line 17) | public class LargestDivisibleSubset368 {
    method largestDivisibleSubset (line 18) | public List<Integer> largestDivisibleSubset(int[] nums) {

FILE: src/LargestNumber179.java
  class LargestNumber179 (line 13) | public class LargestNumber179 {
    method largestNumber (line 14) | public String largestNumber(int[] nums) {
    method largestNumber2 (line 39) | public String largestNumber2(int[] num) {

FILE: src/LargestRectangleInHistogram84.java
  class LargestRectangleInHistogram84 (line 18) | public class LargestRectangleInHistogram84 {
    method largestRectangleArea (line 22) | public int largestRectangleArea(int[] height) {
    method largestRectangleArea2 (line 43) | public int largestRectangleArea2(int[] height) {
    method largestRectangleArea3 (line 82) | public int largestRectangleArea3(int[] height) {
    method largestRectangleArea4 (line 111) | public int largestRectangleArea4(int[] heights) {
    method getMax (line 115) | private int getMax(int[] heights, int s, int e) {

FILE: src/LemonadeChange860.java
  class LemonadeChange860 (line 46) | public class LemonadeChange860 {
    method lemonadeChange (line 47) | public boolean lemonadeChange(int[] bills) {

FILE: src/LengthOfLongestFibonacciSubsequence873.java
  class LengthOfLongestFibonacciSubsequence873 (line 36) | public class LengthOfLongestFibonacciSubsequence873 {
    method lenLongestFibSubseq (line 37) | public int lenLongestFibSubseq(int[] A) {
    method lenLongestFibSubseq2 (line 63) | public int lenLongestFibSubseq2(int[] A) {
    method lenLongestFibSubseq3 (line 86) | public int lenLongestFibSubseq3(int[] A) {
    method lenLongestFibSubseq4 (line 114) | public int lenLongestFibSubseq4(int[] A) {
    method lenLongestFibSubseq5 (line 141) | public int lenLongestFibSubseq5(int[] A) {
    method lenLongestFibSubseq6 (line 163) | public int lenLongestFibSubseq6(int[] A) {

FILE: src/LetterCombinationsOfAPhoneNumber17.java
  class LetterCombinationsOfAPhoneNumber17 (line 20) | public class LetterCombinationsOfAPhoneNumber17 {
    method letterCombinations (line 24) | public List<String> letterCombinations(String digits) {
    method letterCombinations2 (line 48) | public List<String> letterCombinations2(String digits) {
    method combination (line 56) | private void combination(String prefix, String digits, int offset, Lis...
    method letterCombinations4 (line 71) | public List<String> letterCombinations4(String digits) {
    method helper (line 83) | private void helper(List<String> res, String[] letters, int i, StringB...

FILE: src/LexicographicalNumbers386.java
  class LexicographicalNumbers386 (line 10) | public class LexicographicalNumbers386 {
    method lexicalOrder (line 11) | public List<Integer> lexicalOrder(int n) {
    method helper (line 19) | private void helper(int curr, List<Integer> res, int n) {
    method lexicalOrder2 (line 31) | public List<Integer> lexicalOrder2(int n) {
    method dfs (line 39) | private void dfs(int start, int end, int n, List<Integer> res){
    method lexicalOrder3 (line 55) | public List<Integer> lexicalOrder3(int n) {

FILE: src/LicenseKeyFormatting482.java
  class LicenseKeyFormatting482 (line 35) | public class LicenseKeyFormatting482 {
    method licenseKeyFormatting (line 36) | public String licenseKeyFormatting(String S, int K) {

FILE: src/LinkedListCycle141.java
  class LinkedListCycle141 (line 22) | public class LinkedListCycle141 {
    method hasCycle (line 23) | public boolean hasCycle(ListNode head) {

FILE: src/LinkedListCycleII142.java
  class LinkedListCycleII142 (line 23) | public class LinkedListCycleII142 {
    method detectCycle (line 24) | public ListNode detectCycle(ListNode head) {

FILE: src/LinkedListRandomNode382.java
  class LinkedListRandomNode382 (line 31) | public class LinkedListRandomNode382 {
    class Solution (line 32) | class Solution {
      method Solution (line 37) | public Solution(ListNode head) {
      method getRandom (line 42) | public int getRandom() {

FILE: src/ListNode.java
  class ListNode (line 5) | public class ListNode {
    method ListNode (line 8) | ListNode(int x) { val = x; }

FILE: src/LoggerRateLimiter359.java
  class LoggerRateLimiter359 (line 35) | public class LoggerRateLimiter359 {
    class Logger (line 36) | class Logger {
      method Logger (line 40) | public Logger() {
      method shouldPrintMessage (line 47) | public boolean shouldPrintMessage(int timestamp, String message) {
    class Logger2 (line 59) | class Logger2 {
      method Logger (line 64) | public Logger() {
      method shouldPrintMessage (line 75) | public boolean shouldPrintMessage(int timestamp, String message) {

FILE: src/LonelyPixelI531.java
  class LonelyPixelI531 (line 23) | public class LonelyPixelI531 {
    method findLonelyPixel (line 24) | public int findLonelyPixel(char[][] picture) {

FILE: src/LongestAbsoluteFilePath388.java
  class LongestAbsoluteFilePath388 (line 48) | public class LongestAbsoluteFilePath388 {
    method lengthLongestPath (line 49) | public int lengthLongestPath(String input) {
    method levelOf (line 73) | private int levelOf(String path) {
    method lengthLongestPath2 (line 86) | public int lengthLongestPath2(String input) {
    method lengthLongestPath3 (line 101) | public int lengthLongestPath3(String input) {

FILE: src/LongestCommonPrefix14.java
  class LongestCommonPrefix14 (line 6) | public class LongestCommonPrefix14 {
    method longestCommonPrefix (line 7) | public String longestCommonPrefix(String[] strs) {
    method longestCommonPrefix2 (line 45) | public String longestCommonPrefix2(String[] strs) {
    method longestCommonPrefix3 (line 61) | public String longestCommonPrefix3(String[] strs) {

FILE: src/LongestConsecutiveSequence128.java
  class LongestConsecutiveSequence128 (line 15) | public class LongestConsecutiveSequence128 {
    method longestConsecutive (line 16) | public int longestConsecutive(int[] nums) {
    class Range (line 53) | class Range {
      method Range (line 56) | Range (int l0,int r0) { l=l0; r=r0; }
    method longestConsecutive2 (line 59) | public int longestConsecutive2(int[] nums) {
    method longestConsecutive3 (line 79) | public int longestConsecutive3(int[] nums) {

FILE: src/LongestContinuousIncreasingSubsequence674.java
  class LongestContinuousIncreasingSubsequence674 (line 22) | public class LongestContinuousIncreasingSubsequence674 {
    method findLengthOfLCIS (line 23) | public int findLengthOfLCIS(int[] nums) {
    method findLengthOfLCIS2 (line 41) | public int findLengthOfLCIS2(int[] nums) {

FILE: src/LongestHarmoniousSubsequence594.java
  class LongestHarmoniousSubsequence594 (line 18) | public class LongestHarmoniousSubsequence594 {
    method findLHS (line 19) | public int findLHS(int[] nums) {
    method findLHS2 (line 42) | public int findLHS2(int[] nums) {
    method findLHS3 (line 59) | public int findLHS3(int[] nums) {
    method findLHS4 (line 83) | public int findLHS4(int[] nums) {

FILE: src/LongestIncreasingSubsequence300.java
  class LongestIncreasingSubsequence300 (line 16) | public class LongestIncreasingSubsequence300 {
    method lengthOfLIS (line 17) | public int lengthOfLIS(int[] nums) {
    method lengthOfLIS2 (line 39) | public int lengthOfLIS2(int[] nums) {
    method lengthOfLIS3 (line 59) | public int lengthOfLIS3(int[] nums) {
    method lengthofLIS (line 67) | public int lengthofLIS(int[] nums, int previndex, int curpos, int[][] ...
    method lengthOfLIS4 (line 88) | public int lengthOfLIS4(int[] nums) {

FILE: src/LongestMountainInArray845.java
  class LongestMountainInArray845 (line 32) | public class LongestMountainInArray845 {
    method longestMountain (line 33) | public int longestMountain(int[] A) {

FILE: src/LongestPalindrome409.java
  class LongestPalindrome409 (line 20) | public class LongestPalindrome409 {
    method longestPalindrome (line 21) | public int longestPalindrome(String s) {
    method longestPalindrome2 (line 44) | public int longestPalindrome2(String s) {
    method longestPalindrome3 (line 64) | public int longestPalindrome3(String s) {

FILE: src/LongestPalindromicSubsequence516.java
  class LongestPalindromicSubsequence516 (line 20) | public class LongestPalindromicSubsequence516 {
    method longestPalindromeSubseq (line 21) | public int longestPalindromeSubseq(String s) {
    method longestPalindromeSubseq2 (line 45) | public int longestPalindromeSubseq2(String s) {
    method helper (line 51) | private int helper(char[] chars, int i, int j, int[][] dp) {

FILE: src/LongestPalindromicSubstring5.java
  class LongestPalindromicSubstring5 (line 22) | public class LongestPalindromicSubstring5 {
    method longestPalindrome (line 23) | public String longestPalindrome(String s) {
    method longestPalindrome2 (line 56) | public String longestPalindrome2(String s) {
    method extendPalindrome (line 66) | private void extendPalindrome(String s, int j, int k) {
    method longestPalindrome3 (line 81) | public String longestPalindrome3(String s) {
    method longestPalindrome4 (line 98) | public String longestPalindrome4(String s) {
    method longestPalindrome5 (line 132) | public String longestPalindrome5(String s) {
    method expandAroundCenter (line 147) | private int expandAroundCenter(String s, int left, int right) {

FILE: src/LongestRepeatingCharacterReplacement424.java
  class LongestRepeatingCharacterReplacement424 (line 30) | public class LongestRepeatingCharacterReplacement424 {
    method characterReplacement (line 31) | public int characterReplacement(String s, int k) {
    class Point (line 61) | class Point {
      method Point (line 64) | Point(char c, int cnt) {
    method characterReplacement2 (line 71) | public int characterReplacement2(String s, int k) {
    method getMax (line 95) | private int getMax(int[] map) {
    method characterReplacement3 (line 115) | public int characterReplacement3(String s, int k) {

FILE: src/LongestSubstringWithAtMostKDistinctCharacters340.java
  class LongestSubstringWithAtMostKDistinctCharacters340 (line 11) | public class LongestSubstringWithAtMostKDistinctCharacters340 {
    method lengthOfLongestSubstringKDistinct (line 12) | public int lengthOfLongestSubstringKDistinct(String s, int k) {
    method lengthOfLongestSubstringKDistinct2 (line 46) | public int lengthOfLongestSubstringKDistinct2(String str, int k) {
    method lengthOfLongestSubstringKDistinct3 (line 78) | public int lengthOfLongestSubstringKDistinct3(String s, int k) {

FILE: src/LongestSubstringWithAtMostTwoDistinctCharacters159.java
  class LongestSubstringWithAtMostTwoDistinctCharacters159 (line 16) | public class LongestSubstringWithAtMostTwoDistinctCharacters159 {
    method lengthOfLongestSubstringTwoDistinct (line 17) | public int lengthOfLongestSubstringTwoDistinct(String s) {
    method lengthOfLongestSubstringKDistinct (line 22) | public int lengthOfLongestSubstringKDistinct(String s, int k) {

FILE: src/LongestSubstringWithoutRepeatingCharacters3.java
  class LongestSubstringWithoutRepeatingCharacters3 (line 19) | public class LongestSubstringWithoutRepeatingCharacters3 {
    method lengthOfLongestSubstring (line 20) | public int lengthOfLongestSubstring(String s) {
    method remove (line 46) | private int remove(int start, int now, char re, Map<Character, Integer...
    method lengthOfLongestSubstring2 (line 63) | public int lengthOfLongestSubstring2(String s) {
    method lengthOfLongestSubstring3 (line 78) | public int lengthOfLongestSubstring3(String s) {
    method lengthOfLongestSubstring4 (line 94) | public int lengthOfLongestSubstring4(String s) {

FILE: src/LongestUnivaluePath687.java
  class LongestUnivaluePath687 (line 41) | public class LongestUnivaluePath687 {
    method longestUnivaluePath (line 42) | public int longestUnivaluePath(TreeNode root) {
    method helper (line 47) | private int[] helper(TreeNode root) {
    method longestUnivaluePath2 (line 78) | public int longestUnivaluePath2(TreeNode root) {
    method arrowLength (line 83) | public int arrowLength(TreeNode node) {

FILE: src/LongestValidParentheses32.java
  class LongestValidParentheses32 (line 17) | public class LongestValidParentheses32 {
    method longestValidParentheses (line 18) | public int longestValidParentheses(String s) {
    method longestValidParentheses2 (line 53) | public int longestValidParentheses2(String s) {
    method longestValidParentheses3 (line 76) | public int longestValidParentheses3(String s) {

FILE: src/LongestWordInDictionary720.java
  class LongestWordInDictionary720 (line 30) | public class LongestWordInDictionary720 {
    method longestWord (line 31) | public String longestWord(String[] words) {
    method longestWord2 (line 55) | public String longestWord2(String[] words) {
    method longestWord3 (line 69) | public String longestWord3(String[] words) {
    method dfs (line 77) | private void dfs(Trie trie, StringBuilder sb, String[] res) {
    method constructTrie (line 91) | private Trie constructTrie(String[] words) {
    class Trie (line 100) | class Trie {
      method add (line 104) | void add(String word) {
      method add (line 108) | void add(char[] word, int i) {

FILE: src/LowestCommonAncestorOfABinarySearchTree235.java
  class LowestCommonAncestorOfABinarySearchTree235 (line 45) | public class LowestCommonAncestorOfABinarySearchTree235 {
    method lowestCommonAncestor (line 46) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...
    method lowestCommonAncestor2 (line 60) | public TreeNode lowestCommonAncestor2(TreeNode root, TreeNode p, TreeN...
    method lowestCommonAncestor3 (line 67) | public TreeNode lowestCommonAncestor3(TreeNode root, TreeNode p, TreeN...
    method lowestCommonAncestor4 (line 74) | public TreeNode lowestCommonAncestor4(TreeNode root, TreeNode p, TreeN...
    method find (line 88) | private boolean find(TreeNode root, TreeNode n) {

FILE: src/LowestCommonAncestorOfABinaryTree236.java
  class LowestCommonAncestorOfABinaryTree236 (line 45) | public class LowestCommonAncestorOfABinaryTree236 {
    method lowestCommonAncestor (line 46) | public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNo...

FILE: src/MagicalString481.java
  class MagicalString481 (line 31) | public class MagicalString481 {
    method magicalString (line 32) | public int magicalString(int N) {

FILE: src/MajorityElement169.java
  class MajorityElement169 (line 9) | public class MajorityElement169 {
    method majorityElement (line 10) | public int majorityElement(int[] nums) {
    method majorityElement2 (line 28) | public int majorityElement2(int[] num) {
    method majorityElement3 (line 47) | public int majorityElement3(int[] num) {
    method majorityElement4 (line 56) | public int majorityElement4(int[] nums) {

FILE: src/MapSumPairs677.java
  class MapSumPairs677 (line 21) | public class MapSumPairs677 {
    class MapSum (line 23) | class MapSum {
      method MapSum (line 27) | public MapSum() {
      method insert (line 30) | public void insert(String key, int val) {
      method sum (line 34) | public int sum(String prefix) {
      class Trie (line 38) | class Trie {
        method add (line 43) | public void add(String key, int val) {
        method add (line 47) | private Integer add(char[] chars, int val, int i) {
        method getSum (line 64) | public int getSum(String prefix) {
        method getSum (line 69) | private int getSum(char[] chars, int i) {
    class MapSum2 (line 79) | class MapSum2 {
      method MapSum (line 84) | public MapSum() {
      method insert (line 87) | public void insert(String key, int val) {
      method sum (line 93) | public int sum(String prefix) {
      class Trie (line 97) | class Trie {
        method add (line 101) | public void add(String key, int diff) {
        method add (line 105) | private void add(char[] chars, int diff, int i) {
        method getSum (line 118) | public int getSum(String prefix) {
        method getSum (line 122) | private int getSum(char[] chars, int i) {

FILE: src/MatchsticksToSquare473.java
  class MatchsticksToSquare473 (line 29) | public class MatchsticksToSquare473 {
    method makesquare (line 30) | public boolean makesquare(int[] nums) {
    method canPartitionKSubsets (line 36) | public boolean canPartitionKSubsets(int[] nums, int k) {
    method valid (line 48) | private boolean valid(int[] nums, boolean[] visited, int start, int cu...

FILE: src/MaxAreaOfIsland695.java
  class MaxAreaOfIsland695 (line 29) | public class MaxAreaOfIsland695 {
    method maxAreaOfIsland (line 33) | public int maxAreaOfIsland(int[][] grid) {
    method bfs (line 49) | private int bfs(int[][] grid, boolean[][] visited, int i, int j) {
    method maxAreaOfIsland2 (line 70) | public int maxAreaOfIsland2(int[][] grid) {
    method dfs (line 86) | private int dfs(int[][] grid, boolean[][] visited, int i, int j) {
    method maxAreaOfIsland3 (line 103) | public int maxAreaOfIsland3(int[][] grid) {
    method link (line 120) | private int link(int[][] grid, int i, int j, UinionFind uf, int M, int...
    class UinionFind (line 132) | class UinionFind {
      method UinionFind (line 137) | UinionFind(int[][] grid) {
      method find (line 147) | int find(int x) {
      method union (line 154) | int union(int x, int y) {
      method getSize (line 175) | int getSize(int x) {

FILE: src/MaxChunksToMakeSorted769.java
  class MaxChunksToMakeSorted769 (line 30) | public class MaxChunksToMakeSorted769 {
    method maxChunksToSorted (line 31) | public int maxChunksToSorted(int[] arr) {

FILE: src/MaxChunksToMakeSortedII768.java
  class MaxChunksToMakeSortedII768 (line 33) | public class MaxChunksToMakeSortedII768 {
    method maxChunksToSorted (line 34) | public int maxChunksToSorted(int[] arr) {
    method maxChunksToSorted2 (line 54) | public int maxChunksToSorted2(int[] arr) {

FILE: src/MaxConsecutiveOnes485.java
  class MaxConsecutiveOnes485 (line 16) | public class MaxConsecutiveOnes485 {
    method findMaxConsecutiveOnes (line 17) | public int findMaxConsecutiveOnes(int[] nums) {
    method findMaxConsecutiveOnes2 (line 40) | public int findMaxConsecutiveOnes2(int[] nums) {

FILE: src/MaxConsecutiveOnesII487.java
  class MaxConsecutiveOnesII487 (line 21) | public class MaxConsecutiveOnesII487 {
    method findMaxConsecutiveOnes (line 22) | public int findMaxConsecutiveOnes(int[] nums) {

FILE: src/MaxIncreaseToKeepCitySkyline807.java
  class MaxIncreaseToKeepCitySkyline807 (line 44) | public class MaxIncreaseToKeepCitySkyline807 {
    method maxIncreaseKeepingSkyline (line 45) | public int maxIncreaseKeepingSkyline(int[][] grid) {

FILE: src/MaxPointsOnALine149.java
  class MaxPointsOnALine149 (line 17) | public class MaxPointsOnALine149 {
    method maxPoints (line 21) | public int maxPoints(Point[] points) {
    method getSlope (line 48) | private Double getSlope(Point p1, Point p2) {
    method pointsEqual (line 54) | private boolean pointsEqual(Point p1, Point p2) {
    method maxPoints2 (line 60) | public int maxPoints2(Point[] points) {
    method gcd (line 92) | private int gcd(int a, int b) {

FILE: src/MaxStack716.java
  class MaxStack716 (line 30) | public class MaxStack716 {
    class MaxStack (line 32) | class MaxStack {
      method MaxStack (line 37) | public MaxStack() {
      method push (line 41) | public void push(int x) {
      method pop (line 46) | public int pop() {
      method top (line 50) | public int top() {
      method peekMax (line 54) | public int peekMax() {
      method popMax (line 58) | public int popMax() {
      class Element (line 71) | class Element {
        method Element (line 74) | public Element(int val, int max) {

FILE: src/MaxSumOfRectangleNoLargerThanK363.java
  class MaxSumOfRectangleNoLargerThanK363 (line 20) | public class MaxSumOfRectangleNoLargerThanK363 {
    method maxSumSubmatrix (line 21) | public int maxSumSubmatrix(int[][] matrix, int k) {

FILE: src/MaximalRectangle85.java
  class MaximalRectangle85 (line 15) | public class MaximalRectangle85 {
    method maximalRectangle (line 16) | public int maximalRectangle(char[][] matrix) {
    method helper (line 39) | private int helper(int[][] left, int[][] top, int i, int j) {
    method maximalRectangle2 (line 57) | public int maximalRectangle2(char[][] matrix) {
    method maximalRectangle3 (line 95) | public int maximalRectangle3(char[][] matrix) {
    method resetHeight (line 111) | private void resetHeight(char[][] matrix, int[] height, int idx){
    method largestInLine (line 118) | public int largestInLine(int[] height) {
    method maximalRectangle4 (line 140) | public int maximalRectangle4(char[][] matrix) {
    method largestRectangleArea (line 166) | public int largestRectangleArea(int[] heights) {
    method maximalRectangle5 (line 223) | public int maximalRectangle5(char[][] matrix) {
    method maximalRectangle6 (line 254) | public int maximalRectangle6(char[][] matrix) {
    method maximalRectangle7 (line 278) | public int maximalRectangle7(char[][] matrix) {
    method main (line 321) | public static void main(String[] args) {

FILE: src/MaximalSquare221.java
  class MaximalSquare221 (line 17) | public class MaximalSquare221 {
    method maximalSquare (line 18) | public int maximalSquare(char[][] matrix) {
    method maximalSquare2 (line 52) | public int maximalSquare2(char[][] matrix) {
    method maximalSquare3 (line 71) | public int maximalSquare3(char[][] matrix) {

FILE: src/MaximizeDistanceToClosestPerson849.java
  class MaximizeDistanceToClosestPerson849 (line 35) | public class MaximizeDistanceToClosestPerson849 {
    method maxDistToClosest (line 36) | public int maxDistToClosest(int[] seats) {

FILE: src/MaximumAverageSubarrayI643.java
  class MaximumAverageSubarrayI643 (line 16) | public class MaximumAverageSubarrayI643 {
    method findMaxAverage (line 17) | public double findMaxAverage(int[] nums, int k) {

FILE: src/MaximumBinaryTree654.java
  class MaximumBinaryTree654 (line 39) | public class MaximumBinaryTree654 {
    method constructMaximumBinaryTree (line 40) | public TreeNode constructMaximumBinaryTree(int[] nums) {
    method constructMaximumBinaryTree (line 44) | public TreeNode constructMaximumBinaryTree(int[] nums, int lo, int hi) {
    method maxIndex (line 55) | private int maxIndex(int[] nums, int lo, int hi) {
    method constructMaximumBinaryTree2 (line 68) | public TreeNode constructMaximumBinaryTree2(int[] nums) {
    method constructMaximumBinaryTree3 (line 100) | public TreeNode constructMaximumBinaryTree3(int[] nums) {

FILE: src/MaximumDepthOfBinaryTree104.java
  class MaximumDepthOfBinaryTree104 (line 22) | public class MaximumDepthOfBinaryTree104 {
    method maxDepth (line 23) | public int maxDepth(TreeNode root) {

FILE: src/MaximumFrequencyStack895.java
  class MaximumFrequencyStack895 (line 41) | public class MaximumFrequencyStack895 {
    class FreqStack (line 45) | class FreqStack {
      method FreqStack (line 50) | public FreqStack() {
      method push (line 56) | public void push(int x) {
      method pop (line 65) | public int pop() {

FILE: src/MaximumLengthOfPairChain646.java
  class MaximumLengthOfPairChain646 (line 20) | public class MaximumLengthOfPairChain646 {
    method findLongestChain (line 21) | public int findLongestChain(int[][] pairs) {
    method findLongestChain2 (line 43) | public int findLongestChain2(int[][] pairs) {
    method findLongestChain3 (line 61) | public int findLongestChain3(int[][] pairs) {

FILE: src/MaximumLengthOfRepeatedSubarray718.java
  class MaximumLengthOfRepeatedSubarray718 (line 21) | public class MaximumLengthOfRepeatedSubarray718 {
    method findLength (line 22) | public int findLength(int[] A, int[] B) {
    method findLength2 (line 36) | public int findLength2(int[] A, int[] B) {
    method findLength3 (line 57) | public int findLength3(int[] A, int[] B) {
    method findLength4 (line 74) | public int findLength4(int[] a, int[] b) {
    method findLength5 (line 86) | public int findLength5(int[] A, int[] B) {
    method findLength6 (line 105) | public int findLength6(int[] A, int[] B) {

FILE: src/MaximumProductOfThreeNumbers628.java
  class MaximumProductOfThreeNumbers628 (line 22) | public class MaximumProductOfThreeNumbers628 {
    method maximumProduct (line 23) | public int maximumProduct(int[] nums) {
    method maximumProduct2 (line 34) | public int maximumProduct2(int[] nums) {

FILE: src/MaximumProductOfWordLengths318.java
  class MaximumProductOfWordLengths318 (line 23) | public class MaximumProductOfWordLengths318 {
    method maxProduct (line 24) | public int maxProduct(String[] words) {
    method bits (line 46) | private int bits(String word) {

FILE: src/MaximumProductSubarray152.java
  class MaximumProductSubarray152 (line 16) | public class MaximumProductSubarray152 {
    method maxProduct (line 18) | public int maxProduct(int[] nums) {
    method maxProduct2 (line 48) | public int maxProduct2(int[] nums) {
    method maxProduct3 (line 85) | public int maxProduct3(int[] A) {
    method maxProduct4 (line 105) | public int maxProduct4(int A[]) {

FILE: src/MaximumSizeSubarraySumEqualsK325.java
  class MaximumSizeSubarraySumEqualsK325 (line 23) | public class MaximumSizeSubarraySumEqualsK325 {
    method maxSubArrayLen (line 25) | public int maxSubArrayLen(int[] nums, int k) {
    method maxSubArrayLen2 (line 42) | public int maxSubArrayLen2(int[] nums, int k) {
    method maxSubArrayLen3 (line 60) | public int maxSubArrayLen3(int[] nums, int k) {

FILE: src/MaximumSubarray53.java
  class MaximumSubarray53 (line 15) | public class MaximumSubarray53 {
    method maxSubArray (line 16) | public int maxSubArray(int[] nums) {
    method maxSubArray2 (line 41) | public int maxSubArray2(int[] A) {
    method maxSubArray3 (line 56) | public int maxSubArray3(int[] nums) {
    method maxSubArray (line 61) | private int maxSubArray(int[] nums, int left, int right) {
    method main (line 83) | public static void main(String[] args) {

FILE: src/MaximumSumOf3NonOverlappingSubarrays689.java
  class MaximumSumOf3NonOverlappingSubarrays689 (line 29) | public class MaximumSumOf3NonOverlappingSubarrays689 {
    method maxSumOfThreeSubarrays (line 30) | public int[] maxSumOfThreeSubarrays(int[] nums, int k) {
    method maxSumOfThreeSubarrays2 (line 62) | public int[] maxSumOfThreeSubarrays2(int[] nums, int K) {

FILE: src/MaximumVacationDays568.java
  class MaximumVacationDays568 (line 79) | public class MaximumVacationDays568 {
    method maxVacationDays (line 80) | public int maxVacationDays(int[][] flights, int[][] days) {
    method maxVacationDays2 (line 108) | public int maxVacationDays2(int[][] flights, int[][] days) {
    method maxVacationDays3 (line 144) | public int maxVacationDays3(int[][] flights, int[][] days) {

FILE: src/MaximumWidthOfBinaryTree662.java
  class MaximumWidthOfBinaryTree662 (line 79) | public class MaximumWidthOfBinaryTree662 {
    method widthOfBinaryTree (line 81) | public int widthOfBinaryTree(TreeNode root) {
    method widthOfBinaryTree2 (line 112) | public int widthOfBinaryTree2(TreeNode root) {
    class NodeWrapper (line 140) | class NodeWrapper {
      method NodeWrapper (line 143) | NodeWrapper(TreeNode n, int i) {
    method widthOfBinaryTree3 (line 155) | public int widthOfBinaryTree3(TreeNode root) {
    method dfs (line 161) | public void dfs(TreeNode root, int depth, int pos) {

FILE: src/MaximumXOROfTwoNumbersInAnArray421.java
  class MaximumXOROfTwoNumbersInAnArray421 (line 14) | public class MaximumXOROfTwoNumbersInAnArray421 {
    method findMaximumXOR (line 15) | public int findMaximumXOR(int[] nums) {
    class Trie (line 27) | class Trie {
      method add (line 32) | void add(int n) {
      method add (line 36) | void add(int n, int i) {
      method search (line 51) | int search(int n) {
      method search (line 55) | int search(int n, int i) {
    method findMaximumXOR2 (line 71) | public int findMaximumXOR2(int[] nums) {
    method findMaximumXOR3 (line 90) | public int findMaximumXOR3(int[] nums){

FILE: src/MedianOfTwoSortedArrays4.java
  class MedianOfTwoSortedArrays4 (line 22) | public class MedianOfTwoSortedArrays4 {
    method findMedianSortedArrays (line 23) | public double findMedianSortedArrays(int[] nums1, int[] nums2) {
    method findMedianSortedArrays2 (line 71) | public double findMedianSortedArrays2(int[] A, int[] B) {

FILE: src/MeetingRooms252.java
  class MeetingRooms252 (line 25) | public class MeetingRooms252 {
    method canAttendMeetings (line 26) | public boolean canAttendMeetings(Interval[] intervals) {
    method canAttendMeetings2 (line 38) | public boolean canAttendMeetings2(Interval[] intervals) {

FILE: src/MeetingRoomsII253.java
  class MeetingRoomsII253 (line 22) | public class MeetingRoomsII253 {
    method minMeetingRooms (line 23) | public int minMeetingRooms(Interval[] intervals) {
    method minMeetingRooms2 (line 62) | public int minMeetingRooms2(Interval[] intervals) {
    method minMeetingRooms3 (line 86) | public int minMeetingRooms3(Interval[] intervals) {

FILE: src/MergeIntervals56.java
  class MergeIntervals56 (line 20) | public class MergeIntervals56 {
    method merge (line 21) | public List<Interval> merge(List<Interval> intervals) {
    class SortByLeft (line 42) | class SortByLeft implements Comparator<Interval> {
      method compare (line 43) | @Override
    method merge2 (line 50) | public List<Interval> merge2(List<Interval> intervals) {
    method merge3 (line 77) | public List<Interval> merge3(List<Interval> intervals) {

FILE: src/MergeKSortedLists23.java
  class MergeKSortedLists23 (line 15) | public class MergeKSortedLists23 {
    method mergeKLists (line 19) | public static ListNode mergeKLists(ListNode[] lists){
    method partion (line 23) | public static ListNode partion(ListNode[] lists,int s,int e){
    method merge (line 35) | public static ListNode merge(ListNode l1,ListNode l2){
    method mergeKLists2 (line 51) | public ListNode mergeKLists2(ListNode[] lists) {
    method mergeKLists3 (line 87) | public ListNode mergeKLists3(ListNode[] lists) {
    method mL (line 91) | private ListNode mL(ListNode[] lists, int l, int r) {
    method mergeKLists4 (line 114) | public ListNode mergeKLists4(ListNode[] lists) {
    method mergeKLists5 (line 134) | public ListNode mergeKLists5(ListNode[] lists) {
    method mergeTwoLists (line 148) | public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
    method mergeKLists6 (line 168) | public ListNode mergeKLists6(ListNode[] lists) {
    method mergeKLists (line 174) | public ListNode mergeKLists(ListNode[] lists, int i, int j) {
    method mergeTwoLists (line 183) | private ListNode mergeTwoLists(ListNode l1, ListNode l2) {

FILE: src/MergeSortedArray88.java
  class MergeSortedArray88 (line 13) | public class MergeSortedArray88 {
    method merge (line 14) | public void merge(int[] nums1, int m, int[] nums2, int n) {
    method merge2 (line 40) | public void merge2(int[] nums1, int m, int[] nums2, int n) {

FILE: src/MergeTwoSortedLists21.java
  class MergeTwoSortedLists21 (line 21) | public class MergeTwoSortedLists21 {
    method mergeTwoLists (line 22) | public ListNode mergeTwoLists(ListNode l1, ListNode l2) {
    method mergeTwoLists2 (line 41) | public ListNode mergeTwoLists2(ListNode l1, ListNode l2) {

FILE: src/MiddleOfTheLinkedList876.java
  class MiddleOfTheLinkedList876 (line 34) | public class MiddleOfTheLinkedList876 {
    method middleNode (line 35) | public ListNode middleNode(ListNode head) {

FILE: src/MinCostClimbingStairs746.java
  class MinCostClimbingStairs746 (line 24) | public class MinCostClimbingStairs746 {
    method minCostClimbingStairs (line 25) | public int minCostClimbingStairs(int[] cost) {
    method minCostClimbingStairs2 (line 39) | public int minCostClimbingStairs2(int[] cost) {

FILE: src/MinStack.java
  class MinStack (line 27) | class MinStack {
    method MinStack (line 32) | public MinStack() { }
    method push (line 34) | public void push(int x) {
    method pop (line 44) | public void pop() {
    method top (line 57) | public int top() {
    method getMin (line 61) | public int getMin() {
  class MinStack2 (line 70) | class MinStack2 {
    class Element (line 71) | static class Element
      method Element (line 75) | Element(final int value, final int min)
    method push (line 83) | public void push(int x) {
    method pop (line 88) | public void pop()
    method top (line 93) | public int top()
    method getMin (line 98) | public int getMin()
  class MinStack3 (line 108) | class MinStack3 {
    method MinStack (line 112) | public MinStack(){
    method push (line 116) | public void push(int x) {
    method pop (line 126) | public void pop() {
    method top (line 135) | public int top() {
    method getMin (line 144) | public int getMin() {

FILE: src/Minesweeper529.java
  class Minesweeper529 (line 74) | public class Minesweeper529 {
    method updateBoard (line 77) | public char[][] updateBoard(char[][] board, int[] click) {
    method helper (line 85) | public void helper(char[][] board, int i, int j, int M, int N) {
    method isDigit (line 104) | private boolean isDigit(char c) {
    method numAdjacentMines (line 108) | private int numAdjacentMines(char[][] board, int i, int j, int M, int ...

FILE: src/MinimumASCIIDeleteSumForTwoStrings712.java
  class MinimumASCIIDeleteSumForTwoStrings712 (line 25) | public class MinimumASCIIDeleteSumForTwoStrings712 {
    method minimumDeleteSum (line 26) | public int minimumDeleteSum(String s1, String s2) {

FILE: src/MinimumAbsoluteDifferenceInBST530.java
  class MinimumAbsoluteDifferenceInBST530 (line 35) | public class MinimumAbsoluteDifferenceInBST530 {
    method getMinimumDifference (line 36) | public int getMinimumDifference(TreeNode root) {
    method helper (line 42) | public int[] helper(TreeNode root, int[] res) {

FILE: src/MinimumDepthOfBinaryTree111.java
  class MinimumDepthOfBinaryTree111 (line 32) | public class MinimumDepthOfBinaryTree111 {
    method minDepth (line 33) | public int minDepth(TreeNode root) {

FILE: src/MinimumDistanceBetweenBSTNodes783.java
  class MinimumDistanceBetweenBSTNodes783 (line 39) | public class MinimumDistanceBetweenBSTNodes783 {
    method minDiffInBST (line 40) | public int minDiffInBST(TreeNode root) {
    method minDiffInBST (line 46) | public void minDiffInBST(TreeNode root, LinkedList<Integer> list, int[...
    method minDiffInBST2 (line 56) | public int minDiffInBST2(TreeNode root) {
    method minDiffInBST2 (line 63) | public void minDiffInBST2(TreeNode root, LinkedList<Integer> list, Int...

FILE: src/MinimumGeneticMutation433.java
  class MinimumGeneticMutation433 (line 49) | public class MinimumGeneticMutation433 {
    method minMutation (line 50) | public int minMutation(String start, String end, String[] bank) {
    method helper (line 57) | private int helper(String start, String end, String[] bank, int len, b...
    method diff (line 73) | private Integer diff(String a, String b) {

FILE: src/MinimumHeightTrees310.java
  class MinimumHeightTrees310 (line 52) | public class MinimumHeightTrees310 {
    method findMinHeightTrees (line 53) | public List<Integer> findMinHeightTrees(int n, int[][] edges) {
    method search (line 84) | private int search(Integer p, Integer h, Map<Integer, Map<Integer, Int...
    method findMinHeightTrees2 (line 109) | public List<Integer> findMinHeightTrees2(int n, int[][] edges) {
    method bfs (line 143) | private void bfs(int start, int[] dist, int[] pre) {
    method findMinHeightTree3 (line 162) | public List<Integer> findMinHeightTree3(int n, int[][] edges) {
    method dfs4 (line 207) | private void dfs4(int u, int parent) {
    method dfs4 (line 223) | private void dfs4(int u, int parent, int acc) {
    method findMinHeightTrees4 (line 232) | public List<Integer> findMinHeightTrees4(int n, int[][] edges) {

FILE: src/MinimumMovesToEqualArrayElementsII462.java
  class MinimumMovesToEqualArrayElementsII462 (line 22) | public class MinimumMovesToEqualArrayElementsII462 {
    method minMoves2 (line 23) | public int minMoves2(int[] nums) {

FILE: src/MinimumPathSum64.java
  class MinimumPathSum64 (line 9) | public class MinimumPathSum64 {
    method minPathSum (line 10) | public int minPathSum(int[][] grid) {
    method minPathSum1 (line 38) | public int minPathSum1(int[][] grid) {
    method minPathSum2 (line 60) | public int minPathSum2(int[][] grid) {
    method minPathSumHelper (line 65) | public int minPathSumHelper(int[][] grid, int row, int col, int[][] me...
    method minPathSum3 (line 80) | public int minPathSum3(int[][] grid) {
    method minPathSum (line 85) | public int minPathSum(int[][] grid, int i, int j, int[][] dp) {
    method minPathSum4 (line 103) | public int minPathSum4(int[][] grid) {

FILE: src/MinimumSizeSubarraySum209.java
  class MinimumSizeSubarraySum209 (line 16) | public class MinimumSizeSubarraySum209 {
    method minSubArrayLen (line 17) | public int minSubArrayLen(int s, int[] nums) {
    method minSubArrayLen2 (line 35) | public int minSubArrayLen2(int s, int[] nums) {
    method minSubArrayLen3 (line 56) | public int minSubArrayLen3(int s, int[] nums) {
    method isValid (line 75) | private boolean isValid(int[] nums, int len, int s) {

FILE: src/MinimumWindowSubsequence727.java
  class MinimumWindowSubsequence727 (line 27) | public class MinimumWindowSubsequence727 {
    method minWindow (line 28) | public String minWindow(String S, String T) {
    method minWindow2s (line 76) | public String minWindow2s(String S, String T) {
    method minWindow3 (line 119) | public String minWindow3(String S, String T) {
    method minWindow4 (line 165) | public String minWindow4(String S, String T) {
    method minWindow5 (line 194) | public String minWindow5(String S, String T) {
    method minWindow6 (line 227) | public String minWindow6(String S, String T) {
    method minWindow7 (line 251) | public String minWindow7(String S, String T) {
    method minWindow8 (line 279) | public String minWindow8(String S, String T) {
    method minWindow9 (line 314) | public String minWindow9(String S, String T) {
    method backwards (line 350) | private int backwards(char[] charS, char[] charT, int begin, int end) {

FILE: src/MinimumWindowSubstring76.java
  class MinimumWindowSubstring76 (line 19) | public class MinimumWindowSubstring76 {
    method minWindow (line 23) | public String minWindow(String S, String T) {
    method minWindow2 (line 63) | public String minWindow2(String s, String t) {
    method minWindow3 (line 92) | public String minWindow3(String s, String t) {

FILE: src/MissingNumber268.java
  class MissingNumber268 (line 19) | public class MissingNumber268 {
    method missingNumber (line 20) | public int missingNumber(int[] nums) {
    method missingNumber2 (line 31) | public int missingNumber2(int[] nums) {

FILE: src/MissingRanges163.java
  class MissingRanges163 (line 9) | public class MissingRanges163 {
    method findMissingRanges (line 10) | public List<String> findMissingRanges(int[] nums, int lower, int upper) {

FILE: src/MonotoneIncreasingDigits738.java
  class MonotoneIncreasingDigits738 (line 22) | public class MonotoneIncreasingDigits738 {
    method monotoneIncreasingDigits (line 23) | public int monotoneIncreasingDigits(int N) {
    method monotoneIncreasingDigits2 (line 45) | public int monotoneIncreasingDigits2(int N) {
    method monotoneIncreasingDigits3 (line 59) | public int monotoneIncreasingDigits3(int N) {

FILE: src/MonotonicArray896.java
  class MonotonicArray896 (line 34) | public class MonotonicArray896 {
    method isMonotonic (line 35) | public boolean isMonotonic(int[] A) {
    method isMonotonic2 (line 52) | public boolean isMonotonic2(int[] A) {

FILE: src/MostCommonWord819.java
  class MostCommonWord819 (line 39) | public class MostCommonWord819 {
    method mostCommonWord (line 40) | public String mostCommonWord(String paragraph, String[] banned) {
    method isLetter (line 72) | private boolean isLetter(char c) {
    method mostCommonWord2 (line 78) | public String mostCommonWord2(String paragraph, String[] banned) {

FILE: src/MostFrequentSubtreeSum508.java
  class MostFrequentSubtreeSum508 (line 41) | public class MostFrequentSubtreeSum508 {
    method findFrequentTreeSum (line 42) | public int[] findFrequentTreeSum(TreeNode root) {
    method helper (line 61) | private Integer helper(TreeNode n, Map<Integer, Integer> sums, int[] c...
    method findFrequentTreeSum2 (line 76) | public int[] findFrequentTreeSum2(TreeNode root) {
    method findFrequentTreeSum (line 100) | public int findFrequentTreeSum(TreeNode root, Map<Integer, Integer> ma...

FILE: src/MostProfitAssigningWork826.java
  class MostProfitAssigningWork826 (line 30) | public class MostProfitAssigningWork826 {
    method maxProfitAssignment (line 31) | public int maxProfitAssignment(int[] difficulty, int[] profit, int[] w...
    class Job (line 50) | class Job {
      method Job (line 53) | Job (int d, int p) {

FILE: src/MoveZeroes283.java
  class MoveZeroes283 (line 14) | public class MoveZeroes283 {
    method moveZeroes (line 15) | public void moveZeroes(int[] nums) {
    method moveZeroes2 (line 31) | public void moveZeroes2(int[] nums) {
    method moveZeroes3 (line 49) | public void moveZeroes3(int[] nums) {
    method swap (line 57) | private void swap(int[] arr, int a, int b) {

FILE: src/MovingAverageFromDataStream346.java
  class MovingAverageFromDataStream346 (line 14) | public class MovingAverageFromDataStream346 {
    class MovingAverage (line 15) | class MovingAverage {
      method MovingAverage (line 21) | public MovingAverage(int size) {
      method next (line 27) | public double next(int val) {
    class MovingAverage2 (line 38) | class MovingAverage2 {
      method MovingAverage2 (line 45) | public MovingAverage2(int size) {
      method next (line 49) | public double next(int val) {

FILE: src/MultiplyStrings43.java
  class MultiplyStrings43 (line 21) | public class MultiplyStrings43 {
    method multiply (line 22) | public String multiply(String num1, String num2) {
    method multiplyForOne (line 40) | private StringBuilder multiplyForOne(char[] chars, char ch) {
    method add (line 53) | private StringBuilder add(StringBuilder sb1, StringBuilder sb2) {
    method multiply2 (line 81) | public String multiply2(String num1, String num2) {

FILE: src/MyCalendarI729.java
  class MyCalendarI729 (line 38) | public class MyCalendarI729 {
    class MyCalendar (line 39) | class MyCalendar {
      method MyCalendar (line 42) | public MyCalendar() {
      method book (line 45) | public boolean book(int start, int end) {
      class Interval (line 55) | class Interval {
        method Interval (line 58) | Interval(int s, int e) {
    class MyCalendar2 (line 66) | class MyCalendar2 {
      method MyCalendar (line 69) | public MyCalendar() {
      method book (line 72) | public boolean book(int start, int end) {

FILE: src/MyCalendarII731.java
  class MyCalendarII731 (line 45) | public class MyCalendarII731 {
    class MyCalendarTwo (line 49) | class MyCalendarTwo {
      method book (line 51) | public boolean book(int s, int e) {
      class MyCalendar (line 60) | private static class MyCalendar {
        method book (line 62) | public boolean book(int start, int end) {
    class MyCalendarTwo2 (line 75) | class MyCalendarTwo2 {
      method MyCalendarTwo (line 79) | MyCalendarTwo() {
      method book (line 84) | public boolean book(int start, int end) {
    class MyCalendarTwo3 (line 101) | class MyCalendarTwo3 {
      method MyCalendarTwo (line 104) | public MyCalendarTwo() {
      method book (line 108) | public boolean book(int start, int end) {

FILE: src/NQueens51.java
  class NQueens51 (line 39) | public class NQueens51 {
    method solveNQueens (line 41) | public List<List<String>> solveNQueens(int n) {
    method backtrack (line 80) | private List<Integer> backtrack(List<List<Integer>> trace, int inputI,...
    method foundOneSolution (line 121) | private List<Integer> foundOneSolution(List<List<String>> result, List...
    method attacked (line 147) | private boolean attacked(List<List<Integer>> trace, Integer[] point) {
    method helper (line 165) | private void helper(int r, boolean[] cols, boolean[] d1, boolean[] d2,...
    method solveNQueens2 (line 183) | public List<List<String>> solveNQueens2(int n) {
    method main (line 190) | public static void main(String[] args) {

FILE: src/NQueensII52.java
  class NQueensII52 (line 14) | public class NQueensII52 {
    method helper (line 15) | private void helper(int r, boolean[] cols, boolean[] d1, boolean[] d2,...
    method totalNQueens (line 30) | public int totalNQueens(int n) {
    method main (line 38) | public static void main(String[] args) {

FILE: src/NaryTreeLevelOrderTraversal429.java
  class NaryTreeLevelOrderTraversal429 (line 36) | public class NaryTreeLevelOrderTraversal429 {
    method levelOrder (line 37) | public List<List<Integer>> levelOrder(Node root) {

FILE: src/NaryTreePostorderTraversal590.java
  class NaryTreePostorderTraversal590 (line 27) | public class NaryTreePostorderTraversal590 {
    method postorder (line 28) | public List<Integer> postorder(Node root) {
    method helper (line 34) | private void helper(Node root, List<Integer> res) {
    method postorder2 (line 43) | public List<Integer> postorder2(Node root) {

FILE: src/NestedIterator.java
  class NestedIterator (line 38) | public class NestedIterator implements Iterator<Integer> {
    method NestedIterator (line 41) | public NestedIterator(List<NestedInteger> nestedList) {
    method flattenNestedList (line 45) | private void flattenNestedList(List<NestedInteger> nestedList) {
    method next (line 55) | @Override
    method hasNext (line 60) | @Override

FILE: src/NestedListWeightSum339.java
  class NestedListWeightSum339 (line 49) | public class NestedListWeightSum339 {
    method depthSum (line 50) | public int depthSum(List<NestedInteger> nestedList) {
    method depthSum (line 54) | private int depthSum(List<NestedInteger> nestedList, int level) {

FILE: src/NextClosestTime681.java
  class NextClosestTime681 (line 27) | public class NextClosestTime681 {
    method nextClosestTime (line 28) | public String nextClosestTime(String time) {
    method nextClosestTime2 (line 59) | public String nextClosestTime2(String time) {

FILE: src/NextGreaterElementI496.java
  class NextGreaterElementI496 (line 29) | public class NextGreaterElementI496 {
    method nextGreaterElement (line 30) | public int[] nextGreaterElement(int[] nums1, int[] nums2) {

FILE: src/NextGreaterElementII503.java
  class NextGreaterElementII503 (line 20) | public class NextGreaterElementII503 {
    method nextGreaterElements (line 22) | public int[] nextGreaterElements(int[] nums) {
    method nextGreaterElements2 (line 50) | public int[] nextGreaterElements2(int[] nums) {
    method nextGreaterElements3 (line 82) | public int[] nextGreaterElements3(int[] nums) {
    method nextGreaterElements4 (line 99) | public int[] nextGreaterElements4(int[] nums) {
    method nextGreaterElements5 (line 117) | public int[] nextGreaterElements5(int[] nums) {
    method nextGreaterElements6 (line 150) | public int[] nextGreaterElements6(int[] nums) {

FILE: src/NextGreaterElementIII556.java
  class NextGreaterElementIII556 (line 16) | public class NextGreaterElementIII556 {
    method nextGreaterElement (line 17) | public int nextGreaterElement(int n) {
    method swap (line 50) | private void swap(int[] digits, int i, int j) {
    method nextGreaterElement2 (line 56) | public int nextGreaterElement2(int n) {

FILE: src/NextPermutation31.java
  class NextPermutation31 (line 21) | public class NextPermutation31 {
    method nextPermutation (line 22) | public void nextPermutation(int[] nums) {
    method swap (line 51) | private void swap(int[] nums, int i, int j) {

FILE: src/NonDecreasingArray665.java
  class NonDecreasingArray665 (line 21) | public class NonDecreasingArray665 {
    method checkPossibility (line 22) | public boolean checkPossibility(int[] nums) {
    method checkPossibility2 (line 53) | public boolean checkPossibility2(int[] a) {
    method checkPossibility3 (line 69) | public boolean checkPossibility3(int[] a) {

FILE: src/NonOverlappingIntervals435.java
  class NonOverlappingIntervals435 (line 29) | public class NonOverlappingIntervals435 {
    method compare (line 32) | @Override
    method eraseOverlapIntervals (line 40) | public int eraseOverlapIntervals(Interval[] intervals) {

FILE: src/NumberOfConnectedComponentsInAnUndirectedGraph323.java
  class NumberOfConnectedComponentsInAnUndirectedGraph323 (line 26) | public class NumberOfConnectedComponentsInAnUndirectedGraph323 {
    method countComponents (line 27) | public int countComponents(int n, int[][] edges) {
    class UnionFind (line 41) | class UnionFind {
      method UnionFind (line 45) | UnionFind(int n) {
      method find (line 51) | int find(int x) {
      method union (line 58) | void union(int x, int y) {

FILE: src/NumberOfCornerRectangles750.java
  class NumberOfCornerRectangles750 (line 40) | public class NumberOfCornerRectangles750 {
    method countCornerRectangles (line 41) | public int countCornerRectangles(int[][] grid) {
    method countCornerRectangles2 (line 64) | public int countCornerRectangles2(int[][] grid) {
    method countCornerRectangles3 (line 84) | public int countCornerRectangles3(int[][] grid) {
    method countCornerRectangles4 (line 102) | public int countCornerRectangles4(int[][] grid) {

FILE: src/NumberOfDigitOne233.java
  class NumberOfDigitOne233 (line 10) | public class NumberOfDigitOne233 {
    method countDigitOne (line 11) | public int countDigitOne(int n) {
    method currentOne (line 34) | private int currentOne(int n, int k, int preK, int num, int i) {
    method countDigitOne2 (line 44) | public int countDigitOne2(int n) {
    method countDigitOne3 (line 54) | public int countDigitOne3(int n) {
    method countDigitOne4 (line 69) | public int countDigitOne4(int n) {

FILE: src/NumberOfIslands200.java
  class NumberOfIslands200 (line 27) | public class NumberOfIslands200 {
    method numIslands (line 28) | public int numIslands(char[][] grid) {
    method numIslands (line 46) | private void numIslands(char[][] grid, boolean[][] visited, int i, int...
    method numIslands2 (line 59) | public int numIslands2(char[][] grid) {
    method dfs (line 79) | void dfs(char[][] grid, int r, int c) {
    method numIslands3 (line 96) | public int numIslands3(char[][] grid) {
    method bfs (line 117) | private void bfs(char[][] grid, boolean[][] visited, int i, int j, int...
    class UnionFind (line 148) | class UnionFind {
      method UnionFind (line 153) | public UnionFind(char[][] grid) { // for problem 200
      method find (line 171) | public int find(int i) { // path compression
      method union (line 176) | public void union(int x, int y) { // union with rank
      method getCount (line 192) | public int getCount() {
    method numIslands4 (line 197) | public int numIslands4(char[][] grid) {

FILE: src/NumberOfIslandsII305.java
  class NumberOfIslandsII305 (line 47) | public class NumberOfIslandsII305 {
    method numIslands2 (line 50) | public List<Integer> numIslands2(int m, int n, int[][] positions) {
    method addNumIslands (line 64) | private int addNumIslands(int[][] grid, int i, int j, int m, int n) {
    method isNeighbor (line 73) | private boolean isNeighbor(int[][] grid, int i, int j, boolean[][] vis...
    method travese (line 79) | private void travese(int[][] grid, int i, int j, boolean[][] visited, ...
    method numIslands22 (line 89) | public List<Integer> numIslands22(int m, int n, int[][] positions) {
    method posToIndex (line 119) | private int posToIndex(int i, int j, int n) {
    class DisjointSet (line 123) | class DisjointSet {
      method DisjointSet (line 125) | public DisjointSet(int n) {
      method find (line 130) | public int find(int x) {
      method union (line 135) | public void union(int x, int y) {
    class DisjointSetWithRank (line 142) | class DisjointSetWithRank {
      method DisjointSetWithRank (line 145) | public DisjointSetWithRank(int n) {
      method find (line 151) | public int find(int x) {
      method union (line 156) | public void union(int x, int y) {
    method numIslands23 (line 175) | public List<Integer> numIslands23(int m, int n, int[][] positions) {
    method findIsland (line 207) | public int findIsland(int[] roots, int id) {

FILE: src/NumberOfLongestIncreasingSubsequence673.java
  class NumberOfLongestIncreasingSubsequence673 (line 21) | public class NumberOfLongestIncreasingSubsequence673 {
    method findNumberOfLIS (line 22) | public int findNumberOfLIS(int[] nums) {

FILE: src/NumberOfMatchingSubsequences792.java
  class NumberOfMatchingSubsequences792 (line 20) | public class NumberOfMatchingSubsequences792 {
    method numMatchingSubseq (line 22) | public int numMatchingSubseq(String S, String[] words) {
    method isSubsequence (line 30) | private boolean isSubsequence(String s, String t) {
    method numMatchingSubseq2 (line 47) | public int numMatchingSubseq2(String S, String[] words) {
    class Mover (line 73) | class Mover {
      method Mover (line 76) | Mover (String w) {
      method currChar (line 79) | char currChar() {
      method move (line 82) | void move() {
      method hasEnded (line 85) | boolean hasEnded() {
    method numMatchingSubseq3 (line 91) | public int numMatchingSubseq3(String S, String[] words) {
    method add (line 109) | private Trie add(Trie a, Trie b) {
    method constructTrie (line 114) | private Trie constructTrie(String[] words) {
    class Trie (line 122) | class Trie {
      method add (line 127) | void add(String word) {
      method add (line 131) | void add(char[] word, int i) {

FILE: src/OddEvenLinkedList328.java
  class OddEvenLinkedList328 (line 30) | public class OddEvenLinkedList328 {
    method oddEvenList (line 31) | public ListNode oddEvenList(ListNode head) {
    method oddEvenList2 (line 51) | public ListNode oddEvenList2(ListNode head) {
    method oddEvenList3 (line 75) | public ListNode oddEvenList3(ListNode head) {

FILE: src/OneEditDistance.java
  class OneEditDistance (line 5) | public class OneEditDistance {
    method oneEditDistance (line 6) | public boolean oneEditDistance(String str, String[] wordDict) {
    method helper (line 11) | private boolean helper(char[] str, int i, Trie trie, int edit) {
    method constructTrie (line 35) | private Trie constructTrie(String[] wordDict, int len) {
    class Trie (line 46) | class Trie {
      method add (line 50) | void add(String word) {
      method add (line 54) | void add(char[] word, int i) {
    method oneEditDistance2 (line 68) | public boolean oneEditDistance2(String str, String[] wordDict) {
    method isOneEditDistance (line 77) | private boolean isOneEditDistance(String s, String w) {
    method isOneEditDistance (line 81) | private boolean isOneEditDistance(char[] charsS, int i, char[] charsW,...
    method oneEditDistance3 (line 94) | public boolean oneEditDistance3(String str, String[] wordDict) {
    method main (line 119) | public static void main(String[] args) {

FILE: src/OneEditDistance161.java
  class OneEditDistance161 (line 29) | public class OneEditDistance161 {
    method isOneEditDistance (line 30) | public boolean isOneEditDistance(String s, String t) {
    method isOneReplace (line 43) | private boolean isOneReplace(String s, String t) {
    method isOneDelete (line 58) | private boolean isOneDelete(String longStr, String shortStr) {
    method isOneEditDistance2 (line 80) | public boolean isOneEditDistance2(String s, String t) {
    method isSame (line 102) | private boolean isSame(char[] cs, int i, int lenS, char[] ct, int j, i...

FILE: src/OnesAndZeroes474.java
  class OnesAndZeroes474 (line 26) | public class OnesAndZeroes474 {
    method findMaxForm (line 30) | public int findMaxForm(String[] strs, int m, int n) {
    method calculate (line 34) | public int calculate(String[] strs, int i, int zeroes, int ones, int[]...
    method countzeroesones (line 47) | public int[] countzeroesones(String s) {
    method findMaxForm2 (line 59) | public int findMaxForm2(String[] strs, int m, int n) {

FILE: src/OpenTheLock752.java
  class OpenTheLock752 (line 52) | public class OpenTheLock752 {
    method openLock (line 54) | public int openLock(String[] deadends, String target) {
    method next (line 94) | private int next(int i) {
    method prev (line 98) | private int prev(int i) {

FILE: src/OptimalAccountBalancing465.java
  class OptimalAccountBalancing465 (line 43) | public class OptimalAccountBalancing465 {
    method minTransfers (line 44) | public int minTransfers(int[][] transactions) {
    method dfs (line 54) | private int dfs(int[] posNeg, int start) {
    method getBalances (line 70) | private Map<Integer, Integer> getBalances(int[][] transactions) {

FILE: src/OutputContestMatches544.java
  class OutputContestMatches544 (line 51) | class OutputContestMatches544 {
    method findContestMatch (line 53) | public String findContestMatch(int n) {
    method combine (line 69) | private String combine(String l, String r) {
    method findContestMatch2 (line 81) | public String findContestMatch2(int n) {
    method write (line 89) | public void write(int n, int round) {
    method findContestMatch3 (line 107) | public String findContestMatch3(int n) {
    method helper (line 113) | void helper(StringBuilder sb, int sum, int n, int val) {

FILE: src/PacificAtlanticWaterFlow417.java
  class PacificAtlanticWaterFlow417 (line 36) | public class PacificAtlanticWaterFlow417 {
    method pacificAtlantic (line 39) | public List<int[]> pacificAtlantic(int[][] matrix) {

FILE: src/PaintFence276.java
  class PaintFence276 (line 29) | public class PaintFence276 {
    method numWays (line 30) | public int numWays(int n, int k) {
    method numWays2 (line 42) | public int numWays2(int n, int k) {

FILE: src/PaintHouse256.java
  class PaintHouse256 (line 22) | public class PaintHouse256 {
    method minCost (line 23) | public int minCost(int[][] costs) {
    method minCost2 (line 36) | public int minCost2(int[][] costs) {

FILE: src/PaintHouseII265.java
  class PaintHouseII265 (line 25) | public class PaintHouseII265 {
    method minCostII (line 26) | public int minCostII(int[][] costs) {
    method minIndex (line 46) | private int[] minIndex(int[][] dp, int i, int K) {
    method minCostII2 (line 70) | public int minCostII2(int[][] costs) {
    method minIndex (line 90) | private void minIndex(int[] dp, int K) {
    method minCostII3 (line 112) | public int minCostII3(int[][] costs) {
    method minCostII4 (line 143) | public int minCostII4(int[][] costs) {
    method minCostII5 (line 169) | public int minCostII5(int[][] costs) {

FILE: src/PalindromeLinkedList234.java
  class PalindromeLinkedList234 (line 17) | public class PalindromeLinkedList234 {
    method isPalindrome (line 18) | public boolean isPalindrome(ListNode head) {
    method isPalindrome2 (line 47) | public boolean isPalindrome2(ListNode head) {
    method reverse (line 69) | public ListNode reverse(ListNode head) {

FILE: src/PalindromeNumber9.java
  class PalindromeNumber9 (line 24) | public class PalindromeNumber9 {
    method isPalindrome (line 25) | public boolean isPalindrome(int x) {
    method reverse (line 31) | private int reverse(int x) {
    method numberOfDigits (line 42) | public int numberOfDigits(int x) {
    method getDigit (line 51) | private int getDigit(int x, int pos) {
    method isPalindrome2 (line 55) | public boolean isPalindrome2(int x) {
    method isPalindrome3 (line 71) | public boolean isPalindrome3(int x) {

FILE: src/PalindromePairs336.java
  class PalindromePairs336 (line 19) | public class PalindromePairs336 {
    method palindromePairs (line 20) | public List<List<Integer>> palindromePairs(String[] words) {
    method isPalindrome (line 47) | private boolean isPalindrome(String s1, String s2) {
    method isPalindrome (line 68) | private boolean isPalindrome(String str, int i, int j) {
    method isPalindrome (line 83) | private boolean isPalindrome(String str) {
    method palindromePairs2 (line 101) | public List<List<Integer>> palindromePairs2(String[] words) {
    class TrieNode (line 137) | private static class TrieNode {
      method TrieNode (line 142) | TrieNode() {
    method palindromePairs3 (line 149) | public List<List<Integer>> palindromePairs3(String[] words) {
    method addWord (line 159) | private void addWord(TrieNode root, String word, int index) {
    method search (line 171) | private void search(String[] words, int i, TrieNode root, List<List<In...

FILE: src/PalindromePartitioning131.java
  class PalindromePartitioning131 (line 18) | public class PalindromePartitioning131 {
    method partition (line 19) | public List<List<String>> partition(String s) {
    method helper (line 25) | private void helper(char[] chars, int start, List<String> path, List<L...
    method isPalindrome (line 40) | private boolean isPalindrome(char[] chars, int i, int j) {
    method partition2 (line 53) | public List<List<String>> partition2(String s) {
    method helper (line 67) | private void helper(List<List<String>> res, List<String> path, boolean...

FILE: src/PalindromePermutationII267.java
  class PalindromePermutationII267 (line 16) | public class PalindromePermutationII267 {
    method generatePalindromes (line 17) | public List<String> generatePalindromes(String s) {
    method helper (line 39) | private void helper(int[] map, int curr, StringBuilder sb, List<String...
    method add (line 54) | private void add(StringBuilder sb, char ch) {
    method remove (line 59) | private void remove(StringBuilder sb) {

FILE: src/PalindromicSubstrings647.java
  class PalindromicSubstrings647 (line 23) | public class PalindromicSubstrings647 {
    method countSubstrings (line 24) | public int countSubstrings(String s) {
    method countSubstrings2 (line 49) | public int countSubstrings2(String s) {
    method checkPalindrome (line 59) | private void checkPalindrome(String s, int i, int j) {

FILE: src/PartitionEqualSubsetSum416.java
  class PartitionEqualSubsetSum416 (line 25) | public class PartitionEqualSubsetSum416 {
    method canPartition (line 26) | public boolean canPartition(int[] nums) {
    method canPartition2 (line 67) | public boolean canPartition2(int[] nums) {
    method isPartitionable (line 76) | public boolean isPartitionable(int max,int curr, int index, int[] nums...
    method canPartition3 (line 90) | public boolean canPartition3(int[] nums) {
    method canPartition4 (line 132) | public boolean canPartition4(int[] nums) {

FILE: src/PartitionLabels763.java
  class PartitionLabels763 (line 20) | public class PartitionLabels763 {
    method partitionLabels (line 21) | public List<Integer> partitionLabels(String S) {
    method partitionLabels2 (line 58) | public List<Integer> partitionLabels2(String S) {

FILE: src/PartitionList86.java
  class PartitionList86 (line 23) | public class PartitionList86 {
    method partition (line 24) | public ListNode partition(ListNode head, int x) {
    method partition (line 74) | public ListNode partition(ListNode head, int x) {

FILE: src/PartitionToKEqualSumSubsets698.java
  class PartitionToKEqualSumSubsets698 (line 17) | public class PartitionToKEqualSumSubsets698 {
    method canPartitionKSubsets (line 18) | public boolean canPartitionKSubsets(int[] nums, int k) {
    method valid (line 30) | private boolean valid(int[] nums, boolean[] visited, int start, int cu...
    method canPartitionKSubsets2 (line 46) | public boolean canPartitionKSubsets2(int[] nums, int k) {
    method search (line 78) | public boolean search(int[] groups, int row, int[] nums, int target) {
    method canPartitionKSubsets3 (line 92) | public boolean canPartitionKSubsets3(int[] nums, int k) {

FILE: src/PascalsTriangleII119.java
  class PascalsTriangleII119 (line 18) | public class PascalsTriangleII119 {
    method getRow (line 19) | public List<Integer> getRow(int rowIndex) {
    method getRow2 (line 47) | public List<Integer> getRow2(int rowIndex) {

FILE: src/PatchingArray330.java
  class PatchingArray330 (line 29) | public class PatchingArray330 {
    method minPatches (line 30) | public int minPatches(int[] nums, int n) {

FILE: src/PathSum112.java
  class PathSum112 (line 31) | public class PathSum112 {
    method hasPathSum (line 32) | public boolean hasPathSum(TreeNode root, int sum) {
    method sum (line 36) | private boolean sum(TreeNode root, int sum, int sumForNow) {
    method hasPathSum2 (line 58) | public boolean hasPathSum2(TreeNode root, int sum) {

FILE: src/PathSumII113.java
  class PathSumII113 (line 36) | public class PathSumII113 {
    method pathSum (line 37) | public List<List<Integer>> pathSum(TreeNode root, int sum) {
    method pathSum (line 43) | private void pathSum(TreeNode root, int sumSoFar, int target, List<Int...

FILE: src/PathSumIII437.java
  class PathSumIII437 (line 41) | public class PathSumIII437 {
    method pathSum (line 42) | public int pathSum(TreeNode root, int sum) {
    method pathSum (line 48) | private void pathSum(TreeNode root, int target, int[] res, List<Intege...
    method pathSum2 (line 67) | public int pathSum2(TreeNode root, int sum) {
    method helper (line 73) | public int helper(TreeNode root, int currSum, int target, HashMap<Inte...

FILE: src/PeekingIterator284.java
  class PeekingIterator284 (line 21) | public class PeekingIterator284 {
    class PeekingIterator (line 24) | class PeekingIterator implements Iterator<Integer> {
      method PeekingIterator (line 28) | public PeekingIterator(Iterator<Integer> iterator) {
      method peek (line 37) | public Integer peek() {
      method next (line 43) | @Override
      method hasNext (line 54) | @Override

FILE: src/PerfectSquares279.java
  class PerfectSquares279 (line 11) | public class PerfectSquares279 {
    method numSquares (line 12) | public int numSquares(int n) {
    method main (line 28) | public static void main(String[] args) {

FILE: src/PermutationInString567.java
  class PermutationInString567 (line 20) | public class PermutationInString567 {
    method checkInclusion (line 21) | public boolean checkInclusion(String s1, String s2) {

FILE: src/PermutationSequence60.java
  class PermutationSequence60 (line 29) | public class PermutationSequence60 {
    method getPermutation (line 30) | public String getPermutation(int n, int k) {
    method helper (line 38) | private boolean helper(StringBuilder sb, int n, int k, int[] count, bo...
    method getPermutation2 (line 55) | public String getPermutation2(int n, int k) {

FILE: src/Permutations46.java
  class Permutations46 (line 22) | public class Permutations46 {
    method permute (line 23) | public List<List<Integer>> permute(int[] nums) {
    method helper (line 33) | private void helper(List<List<Integer>> results, List<Integer> result,...
    method permute2 (line 54) | public List<List<Integer>> permute2(int[] nums) {
    method helper (line 63) | private void helper(List<List<Integer>> results, List<Integer> result,...
    method permute3 (line 81) | public List<List<Integer>> permute3(int[] num) {
    method permute4 (line 104) | public List<List<Integer>> permute4(int[] nums) {
    method collectPermutations (line 114) | private void collectPermutations(int[] nums, int start, List<Integer> ...
    method permute5 (line 133) | public List<List<Integer>> permute5(int[] nums) {
    method perm (line 138) | public static void perm(List<List<Integer>> result, int[] nums, int st...
    method permute6 (line 162) | public List<List<Integer>> permute6(int[] nums) {
    method perm (line 168) | private static void perm(List<List<Integer>> result, int[] nums, int s...
    method swap (line 184) | private static void swap(int[] nums, int i, int j) {

FILE: src/PermutationsII47.java
  class PermutationsII47 (line 15) | public class PermutationsII47 {
    method permuteUnique (line 16) | public List<List<Integer>> permuteUnique(int[] nums) {
    method perm (line 25) | private static void perm(Set<List<Integer>> result, int[] nums, int st...
    method swap (line 44) | private static void swap(int[] nums, int i, int j) {
    method permuteUnique2 (line 54) | public List<List<Integer>> permuteUnique2(int[] nums) {
    method perm (line 61) | private static void perm(List<List<Integer>> result, int[] nums, int s...
    method permuteUnique3 (line 84) | public List<List<Integer>> permuteUnique3(int[] nums) {
    method dfs (line 94) | public void dfs(int[] nums, boolean[] used, List<Integer> list, List<L...
    method permuteUnique4s (line 114) | public List<List<Integer>> permuteUnique4s(int[] num) {

FILE: src/PlusOne66.java
  class PlusOne66 (line 12) | public class PlusOne66 {
    method plusOne (line 13) | public int[] plusOne(int[] digits) {
    method plusOne2 (line 29) | public int[] plusOne2(int[] digits) {

FILE: src/PlusOneLinkedList369.java
  class PlusOneLinkedList369 (line 28) | public class PlusOneLinkedList369 {
    method plusOne (line 29) | public ListNode plusOne(ListNode head) {
    method helper (line 38) | public int helper(ListNode head) {
    method plusOne2 (line 50) | public ListNode plusOne2(ListNode head) {

FILE: src/Point.java
  class Point (line 1) | public class Point {
    method Point (line 4) | Point() { x = 0; y = 0; }
    method Point (line 5) | Point(int a, int b) { x = a; y = b; }

FILE: src/PopulatingNextRightPointersInEachNode116.java
  class PopulatingNextRightPointersInEachNode116 (line 47) | public class PopulatingNextRightPointersInEachNode116 {
    method connect (line 48) | public void connect(TreeLinkNode root) {
    method connect2 (line 79) | public void connect2(TreeLinkNode root) {
    method connect3 (line 97) | public void connect3(TreeLinkNode root) {
    method connect4 (line 112) | public void connect4(TreeLinkNode root) {
    method connect (line 119) | private void connect(LinkedList<TreeLinkNode> level) {

FILE: src/PopulatingNextRightPointersInEachNodeII117.java
  class PopulatingNextRightPointersInEachNodeII117 (line 34) | public class PopulatingNextRightPointersInEachNodeII117 {
    method connect (line 35) | public void connect(TreeLinkNode root) {
    method connect (line 42) | private void connect(LinkedList<TreeLinkNode> level) {
    method connect2 (line 60) | public void connect2(TreeLinkNode root) {
    method connect3 (line 81) | public void connect3(TreeLinkNode root) {

FILE: src/PossibleBipartition886.java
  class PossibleBipartition886 (line 35) | public class PossibleBipartition886 {
    method possibleBipartition (line 36) | public boolean possibleBipartition(int N, int[][] dislikes) {
    method helper (line 58) | private boolean helper(int curr, Set<Integer>[] nonGraph, int N, int[]...
    method possibleBipartition2 (line 75) | public boolean possibleBipartition2(int N, int[][] dislikes) {

FILE: src/PowXN50.java
  class PowXN50 (line 22) | public class PowXN50 {
    method myPow (line 26) | public double myPow(double x, int n) {
    method fastPow (line 35) | private double fastPow(double x, long n) {
    method myPow2 (line 51) | public double myPow2(double x, int n) {

FILE: src/PowerOfTwo231.java
  class PowerOfTwo231 (line 19) | public class PowerOfTwo231 {
    method isPowerOfTwo (line 20) | public boolean isPowerOfTwo(int n) {
    method isPowerOfTwo2 (line 33) | public boolean isPowerOfTwo2(int n) {

FILE: src/PredictTheWinner486.java
  class PredictTheWinner486 (line 35) | public class PredictTheWinner486 {
    method PredictTheWinner (line 36) | public boolean PredictTheWinner(int[] nums) {
    method helper (line 44) | private int helper(int[] nums, int p1, int left, int right, boolean tu...
    method PredictTheWinner2 (line 62) | public boolean PredictTheWinner2(int[] nums) {
    method helper (line 70) | private int helper(int[] nums, int left, int right, boolean turn1) {
    method PredictTheWinner3 (line 85) | public boolean PredictTheWinner3(int[] nums) {
    method helper (line 94) | private int helper(int[] nums, int left, int right, boolean turn1, int...
    method PredictTheWinner4 (line 116) | public boolean PredictTheWinner4(int[] nums) {
    method winner (line 121) | public int winner(int[] nums, int s, int e, Integer[][] memo) {
    method PredictTheWinner5 (line 136) | public boolean PredictTheWinner5(int[] nums) {
    method PredictTheWinner6 (line 152) | public boolean PredictTheWinner6(int[] nums) {

FILE: src/ProductOfArrayExceptSelf238.java
  class ProductOfArrayExceptSelf238 (line 18) | public class ProductOfArrayExceptSelf238 {
    method productExceptSelf (line 19) | public int[] productExceptSelf(int[] nums) {
    method productExceptSelf2 (line 33) | public int[] productExceptSelf2(int[] nums) {

FILE: src/ProfitableSchemes879.java
  class ProfitableSchemes879 (line 42) | public class ProfitableSchemes879 {
    method profitableSchemes (line 44) | public int profitableSchemes(int G, int P, int[] group, int[] profit) {
    method profitableSchemes2 (line 67) | public int profitableSchemes2(int G, int P, int[] group, int[] profit) {
    method profitableSchemes3 (line 101) | public int profitableSchemes3(int G, int P, int[] group, int[] profit) {
    method profitableSchemes4 (line 143) | public int profitableSchemes4(int G, int P, int[] group, int[] profit) {
    method profitableSchemes5 (line 161) | public int profitableSchemes5(int G, int P, int[] group, int[] profit) {

FILE: src/ProjectionAreaOf3DShapes887.java
  class ProjectionAreaOf3DShapes887 (line 43) | public class ProjectionAreaOf3DShapes887 {
    method projectionArea (line 44) | public int projectionArea(int[][] grid) {

FILE: src/QuadTreeIntersection558.java
  class QuadTreeIntersection558 (line 96) | public class QuadTreeIntersection558 {
    method intersect (line 97) | public Node intersect(Node quadTree1, Node quadTree2) {
    method getTopLeft (line 122) | private Node getTopLeft(Node n) {
    method getTopRight (line 126) | private Node getTopRight(Node n) {
    method getBottomLeft (line 130) | private Node getBottomLeft(Node n) {
    method getBottomRight (line 134) | private Node getBottomRight(Node n) {
    method allLeaves (line 138) | private boolean allLeaves(Node n) {
    method allSame (line 145) | private boolean allSame(Node n) {
    method intersect2 (line 152) | public Node intersect2(Node q1, Node q2) {

FILE: src/QueueReconstructionByHeight406.java
  class QueueReconstructionByHeight406 (line 23) | public class QueueReconstructionByHeight406 {
    method reconstructQueue (line 24) | public int[][] reconstructQueue(int[][] people) {
    class SortRule (line 38) | class SortRule implements Comparator<int[]> {
      method compare (line 39) | @Override

FILE: src/RandomFlipMatrix519.java
  class RandomFlipMatrix519 (line 33) | public class RandomFlipMatrix519 {
    class Solution (line 37) | class Solution {
      method Solution (line 44) | public Solution(int n_rows, int n_cols) {
      method flip (line 50) | public int[] flip() {
      method reset (line 57) | public void reset() {
    class Solution2 (line 64) | class Solution2 {
      method Solution (line 70) | public Solution(int n_rows, int n_cols) {
      method flip (line 76) | public int[] flip() {
      method reset (line 85) | public void reset() {

FILE: src/RandomListNode.java
  class RandomListNode (line 2) | public class RandomListNode {
    method RandomListNode (line 5) | RandomListNode(int x) { this.label = x; }

FILE: src/RandomPickIndex398.java
  class RandomPickIndex398 (line 23) | public class RandomPickIndex398 {
    class Solution (line 25) | class Solution {
      method Solution (line 28) | public Solution(int[] nums) {
      method pick (line 37) | public int pick(int target) {
    class Solution2 (line 44) | class Solution2 {
      method Solution2 (line 48) | public Solution2(int[] nums) {
      method pick (line 53) | public int pick(int target) {

FILE: src/RangeAddition370.java
  class RangeAddition370 (line 30) | public class RangeAddition370 {
    method getModifiedArray (line 32) | public int[] getModifiedArray(int length, int[][] updates) {
    method getModifiedArray2 (line 44) | public int[] getModifiedArray2(int length, int[][] updates) {
    method getModifiedArray3 (line 57) | public int[] getModifiedArray3(int length, int[][] updates) {
    method getModifiedArray4 (line 75) | public int[] getModifiedArray4(int length, int[][] updates) {
    method getModifiedArray5 (line 92) | public int[] getModifiedArray5(int length, int[][] updates) {
    method getModifiedArray6 (line 110) | public int[] getModifiedArray6(int length, int[][] updates) {

FILE: src/RangeModule715.java
  class RangeModule715 (line 32) | public class RangeModule715 {
    class RangeModule (line 33) | class RangeModule {
      method RangeModule (line 36) | public RangeModule() {
      method addRange (line 40) | public void addRange(int left, int right) {
      method queryRange (line 60) | public boolean queryRange(int left, int right) {
      method removeRange (line 65) | public void removeRange(int left, int right) {
    class RangeModule2 (line 95) | class RangeModule2 {
      method RangeModule (line 97) | public RangeModule() {
      method addRange (line 100) | public void addRange(int left, int right) {
      method queryRange (line 119) | public boolean queryRange(int left, int right) {
      method removeRange (line 125) | public void removeRange(int left, int right) {
      class Range (line 151) | class Range {
        method Range (line 154) | Range (int l, int r) {

FILE: src/RangeSumQuery2DImmutable304.java
  class RangeSumQuery2DImmutable304 (line 32) | public class RangeSumQuery2DImmutable304 {
    class NumMatrix (line 33) | class NumMatrix {
      method NumMatrix (line 35) | public NumMatrix(int[][] matrix) {
      method sumRegion (line 47) | public int sumRegion(int row1, int col1, int row2, int col2) {
    class NumMatrix2 (line 54) | class NumMatrix2 {
      method NumMatrix2 (line 59) | public NumMatrix2(int[][] matrix) {
      method sumRegion (line 72) | public int sumRegion(int row1, int col1, int row2, int col2) {

FILE: src/RangeSumQuery2DMutable308.java
  class RangeSumQuery2DMutable308 (line 32) | public class RangeSumQuery2DMutable308 {
    class NumMatrix (line 33) | class NumMatrix {
      method NumMatrix (line 36) | public NumMatrix(int[][] matrix) {
      method constructTree (line 42) | private Node constructTree(int[][] matrix, int row1, int col1, int r...
      method update (line 64) | public void update(int row, int col, int val) {
      method update (line 68) | private void update(Node root, int row, int col, int val) {
      method sumRegion (line 94) | public int sumRegion(int row1, int col1, int row2, int col2) {
      method sumRegion (line 98) | private int sumRegion(Node root, int row1, int col1, int row2, int c...
      class Node (line 107) | class Node {
        method Node (line 117) | Node (int row1, int col1, int row2, int col2, int sum) {
    class NumMatrix2 (line 131) | class NumMatrix2 {
      method NumMatrix2 (line 137) | public NumMatrix2(int[][] matrix) {
      method update (line 150) | public void update(int row, int col, int val) {
      method sumRegion (line 161) | public int sumRegion(int row1, int col1, int row2, int col2) {
      method sum (line 166) | public int sum(int row, int col) {
    class NumMatrix3 (line 178) | class NumMatrix3 {
      method NumMatrix3 (line 182) | public NumMatrix3(int[][] matrix) {
      method update (line 194) | public void update(int row, int col, int val) {
      method sumRegion (line 203) | public int sumRegion(int row1, int col1, int row2, int col2) {

FILE: src/RangeSumQueryImmutable303.java
  class RangeSumQueryImmutable303 (line 18) | public class RangeSumQueryImmutable303 {
    class NumArray (line 19) | class NumArray {
      method NumArray (line 22) | public NumArray(int[] nums) {
      method sumRange (line 29) | public int sumRange(int i, int j) {

FILE: src/RangeSumQueryMutable307.java
  class RangeSumQueryMutable307 (line 22) | public class RangeSumQueryMutable307 {
    class NumArray (line 23) | class NumArray {
      method NumArray (line 27) | public NumArray(int[] nums) {
      method update (line 35) | public void update(int i, int val) {
      method sumRange (line 43) | public int sumRange(int i, int j) {
    class NumArray2 (line 49) | class NumArray2 {
      method NumArray (line 52) | public NumArray(int[] nums) {
      method constructTree (line 56) | private Node constructTree(int[] nums) {
      method constructTree (line 60) | private Node constructTree(int[] nums, int l, int r) {
      method update (line 74) | public void update(int i, int val) {
      method update (line 78) | public void update(Node root, int i, int val) {
      method sumRange (line 93) | public int sumRange(int i, int j) {
      method sumRange (line 97) | private int sumRange(Node root, int i, int j) {
      class Node (line 112) | class Node {
        method Node (line 118) | Node(int l, int r, int s) {
    class NumArray3 (line 131) | class NumArray3 {
      method NumArray (line 134) | public NumArray(int[] nums) {
      method buildTree (line 141) | private void buildTree(int[] nums) {
      method update (line 148) | public void update(int pos, int val) {
      method sumRange (line 165) | public int sumRange(int l, int r) {
    class NumArray4 (line 188) | class NumArray4 {
      method NumArray (line 193) | public NumArray(int[] nums) {
      method constructTree (line 199) | private void constructTree(int[] nums) {
      method constructTree (line 203) | private void constructTree(int[] nums, int l, int r, int i) {
      method update (line 216) | public void update(int i, int val) {
      method update (line 220) | public void update(int l, int r, int i, int val, int n) {
      method sumRange (line 235) | public int sumRange(int i, int j) {
      method sumRange (line 239) | private int sumRange(int l, int r, int i, int j, int n) {
      method left (line 254) | private int left(int i) {
      method right (line 257) | private int right(int i) {
    class NumArray5 (line 264) | class NumArray5 {
      method NumArray (line 270) | public NumArray(int[] nums) {
      method constructTree (line 276) | private void constructTree(int[] nums) {
      method updateDiff (line 283) | private void updateDiff(int i, int val) {
      method update (line 291) | public void update(int i, int val) {
      method sumRange (line 297) | public int sumRange(int i, int j) {
      method getSum (line 301) | public int getSum(int i) {

FILE: src/RansomNote383.java
  class RansomNote383 (line 17) | public class RansomNote383 {
    method canConstruct (line 18) | public boolean canConstruct(String ransomNote, String magazine) {
    method canConstruct2 (line 29) | public boolean canConstruct2(String ransomNote, String magazine) {

FILE: src/ReadNCharactersGivenRead4IICallMultipleTimes158.java
  class ReadNCharactersGivenRead4IICallMultipleTimes158 (line 18) | public class ReadNChar
Condensed preview — 596 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,966K chars).
[
  {
    "path": ".gitignore",
    "chars": 32,
    "preview": "*.class\n.DS_store\n.vscode\n.idea\n"
  },
  {
    "path": "README.md",
    "chars": 111027,
    "preview": "# leetcode-java\n\n\n| Class Definition |\n|:-------------------------------------------------------------------------------"
  },
  {
    "path": "src/.gitignore",
    "chars": 18,
    "preview": "*.class\n.DS_store\n"
  },
  {
    "path": "src/AccountsMerge721.java",
    "chars": 7372,
    "preview": "/**\n * Given a list accounts, each element accounts[i] is a list of strings, where\n * the first element accounts[i][0] i"
  },
  {
    "path": "src/AddBinary67.java",
    "chars": 3286,
    "preview": "/**\n * Given two binary strings, return their sum (also a binary string).\n *\n * For example,\n * a = \"11\"\n * b = \"1\"\n * R"
  },
  {
    "path": "src/AddBoldTagInString616.java",
    "chars": 8628,
    "preview": "/**\n * Given a string s and a list of strings dict, you need to add a closed pair\n * of bold tag <b> and </b> to wrap th"
  },
  {
    "path": "src/AddOneRowToTree623.java",
    "chars": 3373,
    "preview": "/**\n * Given the root of a binary tree, then value v and depth d, you need to add a\n * row of nodes with value v at the "
  },
  {
    "path": "src/AddStrings415.java",
    "chars": 1836,
    "preview": "/**\n * Given two non-negative integers num1 and num2 represented as string, return\n * the sum of num1 and num2.\n * \n * N"
  },
  {
    "path": "src/AddTwoNumbers2.java",
    "chars": 1996,
    "preview": "/**\n * You are given two non-empty linked lists representing two non-negative\n * integers. The digits are stored in reve"
  },
  {
    "path": "src/AddTwoNumbersII445.java",
    "chars": 3476,
    "preview": "/**\n * You are given two non-empty linked lists representing two non-negative\n * integers. The most significant digit co"
  },
  {
    "path": "src/AlienDictionary269.java",
    "chars": 5981,
    "preview": "/**\n * There is a new alien language which uses the latin alphabet. However, the\n * order among letters are unknown to y"
  },
  {
    "path": "src/AllNodesDistanceKInBinaryTree863.java",
    "chars": 7305,
    "preview": "/**\n * We are given a binary tree (with root node root), a target node, and an\n * integer value K.\n * \n * Return a list "
  },
  {
    "path": "src/AllOOneDataStructure432.java",
    "chars": 6152,
    "preview": "/**\n * Implement a data structure supporting the following operations:\n * \n * Inc(Key) - Inserts a new key with value 1."
  },
  {
    "path": "src/AllPathsFromSourceToTarget797.java",
    "chars": 2296,
    "preview": "/**\n * Given a directed, acyclic graph of N nodes.  Find all possible paths from\n * node 0 to node N-1, and return them "
  },
  {
    "path": "src/AndroidUnlockPatterns351.java",
    "chars": 5114,
    "preview": "/**\n * Given an Android 3x3 key lock screen and two integers m and n, where\n * 1 ≤ m ≤ n ≤ 9, count the total number of "
  },
  {
    "path": "src/AsyncJobMonitor.java",
    "chars": 2433,
    "preview": "/**\n * \n */\n\nimport java.util.Map;\nimport java.util.Queue;\nimport java.util.concurrent.ConcurrentLinkedQueue;\nimport jav"
  },
  {
    "path": "src/AverageOfLevelsInBinaryTree637.java",
    "chars": 1269,
    "preview": "/**\n * Given a non-empty binary tree, return the average value of the nodes on each\n * level in the form of an array.\n *"
  },
  {
    "path": "src/BackspaceStringCompare844.java",
    "chars": 4009,
    "preview": "/**\n * Given two strings S and T, return if they are equal when both are typed into\n * empty text editors. # means a bac"
  },
  {
    "path": "src/BalancedBinaryTree110.java",
    "chars": 2950,
    "preview": "/**\n * Given a binary tree, determine if it is height-balanced.\n *\n * For this problem, a height-balanced binary tree is"
  },
  {
    "path": "src/BaseballGame682.java",
    "chars": 3115,
    "preview": "/**\n * You're now a baseball game point recorder.\n * \n * Given a list of strings, each string can be one of the 4 follow"
  },
  {
    "path": "src/BasicCalculator224.java",
    "chars": 7578,
    "preview": "/**\n * Implement a basic calculator to evaluate a simple expression string.\n *\n * The expression string may contain open"
  },
  {
    "path": "src/BasicCalculatorII227.java",
    "chars": 1735,
    "preview": "/**\n * Implement a basic calculator to evaluate a simple expression string.\n * \n * The expression string contains only n"
  },
  {
    "path": "src/Bench.java",
    "chars": 2178,
    "preview": "/**\n * https://www.careercup.com/question?id=6204431937830912\n */\n\nimport java.util.Arrays;\nimport java.util.PriorityQue"
  },
  {
    "path": "src/BestMeetingPoint296.java",
    "chars": 1561,
    "preview": "/**\n * A group of two or more people wants to meet and minimize the total travel\n * distance. You are given a 2D grid of"
  },
  {
    "path": "src/BestTimeToBuyAndSellStock121.java",
    "chars": 1270,
    "preview": "/**\n * Say you have an array for which the ith element is the price of a given\n * stock on day i.\n *\n * If you were only"
  },
  {
    "path": "src/BestTimeToBuyAndSellStockII122.java",
    "chars": 1718,
    "preview": "/**\n * Say you have an array for which the ith element is the price of a given stock\n * on day i.\n *\n * Design an algori"
  },
  {
    "path": "src/BestTimeToBuyAndSellStockIII123.java",
    "chars": 1784,
    "preview": "/**\n * Say you have an array for which the ith element is the price of a given\n * stock on day i.\n *\n * Design an algori"
  },
  {
    "path": "src/BestTimeToBuyAndSellStockIV188.java",
    "chars": 2571,
    "preview": "/**\n * Say you have an array for which the ith element is the price of a given\n * stock on day i.\n * \n * Design an algor"
  },
  {
    "path": "src/BestTimeToBuyAndSellStockWithCooldown309.java",
    "chars": 1639,
    "preview": "/**\n * Say you have an array for which the ith element is the price of a given\n * stock on day i.\n *\n * Design an algori"
  },
  {
    "path": "src/BestTimeToBuyAndSellStockWithTransactionFee714.java",
    "chars": 1719,
    "preview": "/**\n * Your are given an array of integers prices, for which the i-th element is\n * the price of a given stock on day i;"
  },
  {
    "path": "src/BinarySearchTreeIterator173.java",
    "chars": 1558,
    "preview": "/**\n * Implement an iterator over a binary search tree (BST). Your iterator will be\n * initialized with the root node of"
  },
  {
    "path": "src/BinaryTreeInorderTraversal94.java",
    "chars": 2056,
    "preview": "/**\n * Given a binary tree, return the inorder traversal of its nodes' values.\n *\n * For example:\n * Given binary tree ["
  },
  {
    "path": "src/BinaryTreeLevelOrderTraversal102.java",
    "chars": 3993,
    "preview": "/**\n * Given a binary tree, return the level order traversal of its nodes' values.\n * (ie, from left to right, level by "
  },
  {
    "path": "src/BinaryTreeLevelOrderTraversalII107.java",
    "chars": 1837,
    "preview": "/**\n * Given a binary tree, return the bottom-up level order traversal of its\n * nodes' values. (ie, from left to right,"
  },
  {
    "path": "src/BinaryTreeLongestConsecutiveSequence298.java",
    "chars": 2382,
    "preview": "/**\n * Given a binary tree, find the length of the longest consecutive sequence path.\n * \n * The path refers to any sequ"
  },
  {
    "path": "src/BinaryTreeMaximumPathSum124.java",
    "chars": 1343,
    "preview": "/**\n * Given a binary tree, find the maximum path sum.\n *\n * For this problem, a path is defined as any sequence of node"
  },
  {
    "path": "src/BinaryTreePaths257.java",
    "chars": 1818,
    "preview": "/**\n * Given a binary tree, return all root-to-leaf paths.\n *\n * For example, given the following binary tree:\n *\n *    "
  },
  {
    "path": "src/BinaryTreePreorderTraversal144.java",
    "chars": 1326,
    "preview": "/**\n * Given a binary tree, return the preorder traversal of its nodes' values.\n * \n * Example:\n * \n * Input: [1,null,2,"
  },
  {
    "path": "src/BinaryTreeRightSideView199.java",
    "chars": 1059,
    "preview": "/**\n * Given a binary tree, imagine yourself standing on the right side of it,\n * return the values of the nodes you can"
  },
  {
    "path": "src/BinaryTreeVerticalOrderTraversal314.java",
    "chars": 4834,
    "preview": "/**\n * Given a binary tree, return the vertical order traversal of its nodes' values.\n * (ie, from top to bottom, column"
  },
  {
    "path": "src/BinaryTreeZigzagLevelOrderTraversal103.java",
    "chars": 1567,
    "preview": "/**\n * Given a binary tree, return the zigzag level order traversal of its nodes'\n * values. (ie, from left to right, th"
  },
  {
    "path": "src/BinaryTreesWithFactors823.java",
    "chars": 2567,
    "preview": "/**\n * Given an array of unique integers, each integer is strictly greater than 1.\n * \n * We make a binary tree using th"
  },
  {
    "path": "src/BitwiseANDOfNumbersRange201.java",
    "chars": 1458,
    "preview": "/**\n * Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND\n * of all numbers in this range, inc"
  },
  {
    "path": "src/BoatsToSavePeople885.java",
    "chars": 1239,
    "preview": "/**\n * The i-th person has weight people[i], and each boat can carry a maximum\n * weight of limit.\n * \n * Each boat carr"
  },
  {
    "path": "src/BombEnemy361.java",
    "chars": 6188,
    "preview": "/**\n * Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0'\n * (the number zero), return the maxim"
  },
  {
    "path": "src/BoundaryOfBinaryTree545.java",
    "chars": 3355,
    "preview": "/**\n * Given a binary tree, return the values of its boundary in anti-clockwise\n * direction starting from root. Boundar"
  },
  {
    "path": "src/BrickWall554.java",
    "chars": 1859,
    "preview": "/**\n * There is a brick wall in front of you. The wall is rectangular and has\n * several rows of bricks. The bricks have"
  },
  {
    "path": "src/BricksFallingWhenHit803.java",
    "chars": 6808,
    "preview": "/**\n * We have a grid of 1s and 0s; the 1s in a cell represent bricks. A brick\n * will not drop if and only if it is dir"
  },
  {
    "path": "src/BuddyStrings859.java",
    "chars": 1471,
    "preview": "/**\n * Given two strings A and B of lowercase letters, return true if and only if\n * we can swap two letters in A so tha"
  },
  {
    "path": "src/BullsAndCows299.java",
    "chars": 4302,
    "preview": "/**\n * You are playing the following Bulls and Cows game with your friend:\n * You write down a number and ask your frien"
  },
  {
    "path": "src/BurstBalloons312.java",
    "chars": 5180,
    "preview": "/**\n * Given n balloons, indexed from 0 to n-1. Each balloon is painted with a\n * number on it represented by array nums"
  },
  {
    "path": "src/CanIWin464.java",
    "chars": 3392,
    "preview": "/**\n * In the \"100 game,\" two players take turns adding, to a running total, any\n * integer from 1..10. The player who f"
  },
  {
    "path": "src/CheapestFlightsWithinKStops787.java",
    "chars": 8596,
    "preview": "/**\n * There are n cities connected by m flights. Each fight starts from city u and\n * arrives at v with a price w.\n * \n"
  },
  {
    "path": "src/ClimbingStairs70.java",
    "chars": 1122,
    "preview": "/**\n * You are climbing a stair case. It takes n steps to reach to the top.\n *\n * Each time you can either climb 1 or 2 "
  },
  {
    "path": "src/CloneGraph133.java",
    "chars": 1784,
    "preview": "/**\n * Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.\n *\n *\n * OJ's und"
  },
  {
    "path": "src/ClosestBinarySearchTreeValue270.java",
    "chars": 2880,
    "preview": "/**\n * Given a non-empty binary search tree and a target value, find the value in\n * the BST that is closest to the targ"
  },
  {
    "path": "src/ClosestBinarySearchTreeValueII272.java",
    "chars": 1661,
    "preview": "/**\n * Given a non-empty binary search tree and a target value, find k values in\n * the BST that are closest to the targ"
  },
  {
    "path": "src/CoinChange322.java",
    "chars": 4005,
    "preview": "/**\n * You are given coins of different denominations and a total amount of money\n * amount. Write a function to compute"
  },
  {
    "path": "src/CoinChangeII518.java",
    "chars": 1990,
    "preview": "/**\n * You are given coins of different denominations and a total amount of money.\n * Write a function to compute the nu"
  },
  {
    "path": "src/CollatzConjecture.java",
    "chars": 1191,
    "preview": "/**\n * \n */\n\npublic class CollatzConjecture {\n\n    // public int maxSteps(int n) {\n    //     if (n < 1) return -1;\n    "
  },
  {
    "path": "src/CombinationSum39.java",
    "chars": 1736,
    "preview": "/**\n * Given a set of candidate numbers (candidates) (without duplicates) and a\n * target number (target), find all uniq"
  },
  {
    "path": "src/CombinationSumIII216.java",
    "chars": 1133,
    "preview": "/**\n * Find all possible combinations of k numbers that add up to a number n, given\n * that only numbers from 1 to 9 can"
  },
  {
    "path": "src/CombinationSumIV377.java",
    "chars": 2431,
    "preview": "/**\n * Given an integer array with all positive numbers and no duplicates, find the\n * number of possible combinations t"
  },
  {
    "path": "src/CompareVersionNumbers165.java",
    "chars": 2090,
    "preview": "/**\n * Compare two version numbers version1 and version2.\n * If version1 > version2 return 1; if version1 < version2 ret"
  },
  {
    "path": "src/ConcatenatedWords472.java",
    "chars": 2488,
    "preview": "/**\n * Given a list of words (without duplicates), please write a program that\n * returns all concatenated words in the "
  },
  {
    "path": "src/ConstructBinaryTreeFromInorderAndPostorderTraversal106.java",
    "chars": 1436,
    "preview": "/**\n * Given inorder and postorder traversal of a tree, construct the binary tree.\n * \n * Note:\n * You may assume that d"
  },
  {
    "path": "src/ConstructBinaryTreeFromPreorderAndInorderTraversal105.java",
    "chars": 3905,
    "preview": "/**\n * Given preorder and inorder traversal of a tree, construct the binary tree.\n *\n * Note:\n * You may assume that dup"
  },
  {
    "path": "src/ConstructBinaryTreeFromString536.java",
    "chars": 1919,
    "preview": "/**\n * You need to construct a binary tree from a string consisting of parenthesis\n * and integers.\n * \n * The whole inp"
  },
  {
    "path": "src/ConstructQuadTree427.java",
    "chars": 3358,
    "preview": "/**\n * We want to use quad trees to store an N x N boolean grid. Each cell in the\n * grid can only be true or false. The"
  },
  {
    "path": "src/ContainerWithMostWater11.java",
    "chars": 2200,
    "preview": "/**\n * Given n non-negative integers a1, a2, ..., an, where each represents a point\n * at coordinate (i, ai). n vertical"
  },
  {
    "path": "src/ContainsDuplicate217.java",
    "chars": 780,
    "preview": "/**\n * Given an array of integers, find if the array contains any duplicates. Your\n * function should return true if any"
  },
  {
    "path": "src/ContainsDuplicateIII220.java",
    "chars": 2623,
    "preview": "/**\n * Given an array of integers, find out whether there are two distinct indices\n * i and j in the array such that the"
  },
  {
    "path": "src/ContainsDuplicatesII219.java",
    "chars": 2015,
    "preview": "/**\n * Given an array of integers and an integer k, find out whether there are\n * two distinct indices i and j in the ar"
  },
  {
    "path": "src/ContiguousArray525.java",
    "chars": 2155,
    "preview": "/**\n * Given a binary array, find the maximum length of a contiguous subarray with\n * equal number of 0 and 1.\n *\n * Exa"
  },
  {
    "path": "src/ContinuousSubarraySum523.java",
    "chars": 2280,
    "preview": "/**\n * Given a list of non-negative numbers and a target integer k, write a\n * function to check if the array has a cont"
  },
  {
    "path": "src/ConvertANumberToHexadecimal405.java",
    "chars": 1647,
    "preview": "/**\n * Given an integer, write an algorithm to convert it to hexadecimal. For\n * negative integer, two’s complement meth"
  },
  {
    "path": "src/ConvertBSTToGreaterTree538.java",
    "chars": 1569,
    "preview": "/**\n * Given a Binary Search Tree (BST), convert it to a Greater Tree such that\n * every key of the original BST is chan"
  },
  {
    "path": "src/ConvertBinarySearchTreeToSortedDoublyLinkedList.java",
    "chars": 2798,
    "preview": "/**\n * Convert a BST to a sorted circular doubly-linked list in-place. Think of the\n * left and right pointers as synony"
  },
  {
    "path": "src/ConvertSortedArrayToBinarySearchTree108.java",
    "chars": 1201,
    "preview": "/**\n * Given an array where elements are sorted in ascending order, convert it to a\n * height balanced BST.\n *\n * For th"
  },
  {
    "path": "src/ConvertSortedListToBST109.java",
    "chars": 4561,
    "preview": "/**\n * Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.\n */"
  },
  {
    "path": "src/CopyListWithRandomPointer138.java",
    "chars": 3068,
    "preview": "/**\n * A linked list is given such that each node contains an additional random\n * pointer which could point to any node"
  },
  {
    "path": "src/CountNumbersWithUniqueDigits357.java",
    "chars": 1782,
    "preview": "/**\n * Given a non-negative integer n, count all numbers with unique digits, x,\n * where 0 ≤ x < 10n.\n * \n * Example:\n *"
  },
  {
    "path": "src/CountOfRangeSum327.java",
    "chars": 3107,
    "preview": "/**\n * Given an integer array nums, return the number of range sums that lie in\n * [lower, upper] inclusive.\n *\n * Range"
  },
  {
    "path": "src/CountOfSmallerNumbersAfterSelf315.java",
    "chars": 8471,
    "preview": "/**\n * You are given an integer array nums and you have to return a new counts array.\n * The counts array has the proper"
  },
  {
    "path": "src/CountPrimes204.java",
    "chars": 502,
    "preview": "/**\n * Description:\n *\n * Count the number of prime numbers less than a non-negative number, n.\n */\n\n\npublic class Count"
  },
  {
    "path": "src/CountingBits338.java",
    "chars": 1318,
    "preview": "/**\n * Given a non negative integer number num. For every numbers i in the range\n * 0 ≤ i ≤ num calculate the number of "
  },
  {
    "path": "src/CouplesHoldingHands765.java",
    "chars": 1798,
    "preview": "/**\n * N couples sit in 2N seats arranged in a row and want to hold hands. We want\n * to know the minimum number of swap"
  },
  {
    "path": "src/CourseSchedule207.java",
    "chars": 6140,
    "preview": "/**\n * There are a total of n courses you have to take, labeled from 0 to n - 1.\n *\n * Some courses may have prerequisit"
  },
  {
    "path": "src/CourseScheduleII210.java",
    "chars": 4001,
    "preview": "/**\n * There are a total of n courses you have to take, labeled from 0 to n - 1.\n *\n * Some courses may have prerequisit"
  },
  {
    "path": "src/CutOffTreesForGolfEvent675.java",
    "chars": 3907,
    "preview": "/**\n * You are asked to cut off trees in a forest for a golf event. The forest is\n * represented as a non-negative 2D ma"
  },
  {
    "path": "src/DailyTemperatures739.java",
    "chars": 2309,
    "preview": "/**\n * Given a list of daily temperatures, produce a list that, for each day in the\n * input, tells you how many days yo"
  },
  {
    "path": "src/DataStreamAsDisjointIntervals352.java",
    "chars": 5926,
    "preview": "/**\n * Given a data stream input of non-negative integers a1, a2, ..., an, ...,\n * summarize the numbers seen so far as "
  },
  {
    "path": "src/DecodeString394.java",
    "chars": 5296,
    "preview": "/**\n * Given an encoded string, return it's decoded string.\n *\n * The encoding rule is: k[encoded_string], where the enc"
  },
  {
    "path": "src/DecodeWays91.java",
    "chars": 3799,
    "preview": "/**\n * A message containing letters from A-Z is being encoded to numbers using the\n * following mapping:\n *\n * 'A' -> 1\n"
  },
  {
    "path": "src/DecodeWaysII639.java",
    "chars": 2782,
    "preview": "/**\n * A message containing letters from A-Z is being encoded to numbers using the\n * following mapping way:\n *\n * 'A' -"
  },
  {
    "path": "src/DecodedStringAtIndex884.java",
    "chars": 2296,
    "preview": "/**\n * An encoded string S is given.  To find and write the decoded string to a\n * tape, the encoded string is read one "
  },
  {
    "path": "src/DeleteAndEarn740.java",
    "chars": 2178,
    "preview": "/**\n * Given an array nums of integers, you can perform operations on the array.\n * \n * In each operation, you pick any "
  },
  {
    "path": "src/DeleteNodeInABST450.java",
    "chars": 3144,
    "preview": "/**\n * Given a root node reference of a BST and a key, delete the node with the given\n * key in the BST. Return the root"
  },
  {
    "path": "src/DeleteNodeInALinkedList237.java",
    "chars": 683,
    "preview": "/**\n * Write a function to delete a node (except the tail) in a singly linked list,\n * given only access to that node.\n "
  },
  {
    "path": "src/DesignCircularDeque641.java",
    "chars": 7594,
    "preview": "/**\n * Design your implementation of the circular double-ended queue (deque).\n * \n * Your implementation should support "
  },
  {
    "path": "src/DesignCircularQueue622.java",
    "chars": 6393,
    "preview": "/**\n * Design your implementation of the circular queue. The circular queue is a\n * linear data structure in which the o"
  },
  {
    "path": "src/DesignCompressedStringIterator604.java",
    "chars": 3567,
    "preview": "/**\n * Design and implement a data structure for a compressed string iterator. It\n * should support the following operat"
  },
  {
    "path": "src/DesignHashMap706.java",
    "chars": 8350,
    "preview": "/**\n * Design a HashMap without using any built-in hash table libraries.\n * \n * To be specific, your design should inclu"
  },
  {
    "path": "src/DesignHashSet705.java",
    "chars": 4832,
    "preview": "/**\n * Design a HashSet without using any built-in hash table libraries.\n * \n * To be specific, your design should inclu"
  },
  {
    "path": "src/DesignHitCounter362.java",
    "chars": 4903,
    "preview": "/**\n * Design a hit counter which counts the number of hits received in the\n * past 5 minutes.\n * \n * Each function acce"
  },
  {
    "path": "src/DesignInMemoryFileSystem588.java",
    "chars": 5289,
    "preview": "/**\n * Design an in-memory file system to simulate the following functions:\n * \n * ls: Given a path in string format. If"
  },
  {
    "path": "src/DesignLinkedList707.java",
    "chars": 7227,
    "preview": "/**\n * Design your implementation of the linked list. You can choose to use the\n * singly linked list or the doubly link"
  },
  {
    "path": "src/DesignLogStorageSystem635.java",
    "chars": 5112,
    "preview": "/**\n * You are given several logs that each log contains a unique id and timestamp.\n * Timestamp is a string that has th"
  },
  {
    "path": "src/DesignSearchAutocompleteSystem642.java",
    "chars": 11129,
    "preview": "/**\n * Design a search autocomplete system for a search engine. Users may input a\n * sentence (at least one word and end"
  },
  {
    "path": "src/DesignSnakeGame353.java",
    "chars": 4639,
    "preview": "/**\n * Design a Snake game that is played on a device with screen\n * size = width x height. Play the game online if you "
  },
  {
    "path": "src/DesignTicTacToe348.java",
    "chars": 8014,
    "preview": "/**\n * Design a Tic-tac-toe game that is played between two players on a n x n grid.\n * \n * You may assume the following"
  },
  {
    "path": "src/DesignTwitter355.java",
    "chars": 5058,
    "preview": "/**\n * Design a simplified version of Twitter where users can post tweets,\n * follow/unfollow another user and is able t"
  },
  {
    "path": "src/DiagonalTraverse498.java",
    "chars": 1752,
    "preview": "/**\n * Given a matrix of M x N elements (M rows, N columns), return all elements\n * of the matrix in diagonal order as s"
  },
  {
    "path": "src/DiameterOfBinaryTree543.java",
    "chars": 1116,
    "preview": "/**\n * Given a binary tree, you need to compute the length of the diameter of the\n * tree. The diameter of a binary tree"
  },
  {
    "path": "src/DifferentWaysToAddParentheses241.java",
    "chars": 1531,
    "preview": "/**\n * Given a string of numbers and operators, return all possible results from\n * computing all the different possible"
  },
  {
    "path": "src/DivideTwoIntegers29.java",
    "chars": 1047,
    "preview": "/**\n * Divide two integers without using multiplication, division and mod operator.\n *\n * If it is overflow, return MAX_"
  },
  {
    "path": "src/DominoAndTrominoTiling790.java",
    "chars": 3093,
    "preview": "/**\n * We have two types of tiles: a 2x1 domino shape, and an \"L\" tromino shape.\n * These shapes may be rotated.\n * \n * "
  },
  {
    "path": "src/EditDistance72.java",
    "chars": 2940,
    "preview": "/**\n * Given two words word1 and word2, find the minimum number of steps required\n * to convert word1 to word2. (each op"
  },
  {
    "path": "src/EmployeeFreeTime759.java",
    "chars": 3522,
    "preview": "/**\n * We are given a list schedule of employees, which represents the working time\n * for each employee.\n * \n * Each em"
  },
  {
    "path": "src/EncodeAndDecodeStrings271.java",
    "chars": 2285,
    "preview": "/**\n * Design an algorithm to encode a list of strings to a string. The encoded\n * string is then sent over the network "
  },
  {
    "path": "src/EncodeAndDecodeTinyURL535.java",
    "chars": 3154,
    "preview": "/**\n * Note: This is a companion problem to the System Design problem:\n * Design TinyURL (https://leetcode.com/problems/"
  },
  {
    "path": "src/EqualTreePartition663.java",
    "chars": 1482,
    "preview": "/**\n * Given a binary tree with n nodes, your task is to check if it's possible to\n * partition the tree to two trees wh"
  },
  {
    "path": "src/EvaluateDivision399.java",
    "chars": 5614,
    "preview": "/**\n * Equations are given in the format A / B = k, where A and B are variables\n * represented as strings, and k is a re"
  },
  {
    "path": "src/EvaluateReversePolishNotation150.java",
    "chars": 2017,
    "preview": "/**\n * Evaluate the value of an arithmetic expression in Reverse Polish Notation.\n * \n * Valid operators are +, -, *, /."
  },
  {
    "path": "src/ExamRoom855.java",
    "chars": 4414,
    "preview": "/**\n * In an exam room, there are N seats in a single row, numbered 0, 1, 2, ..., N-1.\n * \n * When a student enters the "
  },
  {
    "path": "src/ExclusiveTimeOfFunctions636.java",
    "chars": 2620,
    "preview": "/**\n * Given the running logs of n functions that are executed in a nonpreemptive\n * single threaded CPU, find the exclu"
  },
  {
    "path": "src/ExpressionAddOperators282.java",
    "chars": 3044,
    "preview": "/**\n * Given a string that contains only digits 0-9 and a target value, return all\n * possibilities to add binary operat"
  },
  {
    "path": "src/FindAllAnagramsInAString438.java",
    "chars": 6355,
    "preview": "/**\n * Given a string s and a non-empty string p, find all the start indices of\n * p's anagrams in s.\n * \n * Strings con"
  },
  {
    "path": "src/FindAllNumbersDisappearedInAnArray448.java",
    "chars": 1289,
    "preview": "/**\n * Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some\n * elements appear twice and others appea"
  },
  {
    "path": "src/FindAnagramMappings760.java",
    "chars": 1193,
    "preview": "/**\n * Given two lists Aand B, and B is an anagram of A. B is an anagram of A means\n * B is made by randomizing the orde"
  },
  {
    "path": "src/FindAndReplacePattern890.java",
    "chars": 2764,
    "preview": "/**\n * You have a list of words and a pattern, and you want to know which words in\n * words matches the pattern.\n * \n * "
  },
  {
    "path": "src/FindBottomLeftTreeValue513.java",
    "chars": 2298,
    "preview": "/**\n * Given a binary tree, find the leftmost value in the last row of the tree.\n *\n * Example 1:\n * Input:\n *\n *     2\n"
  },
  {
    "path": "src/FindCenterOfMassInA2DArray.java",
    "chars": 808,
    "preview": "/**\n * Find Center Of Mass In A 2D Array.\n * https://en.wikipedia.org/wiki/Center_of_mass\n */\n\npublic class FindCenterOf"
  },
  {
    "path": "src/FindDuplicateSubtrees652.java",
    "chars": 1704,
    "preview": "/**\n * Given a binary tree, return all duplicate subtrees. For each kind of\n * duplicate subtrees, you only need to retu"
  },
  {
    "path": "src/FindEventualSafeStates802.java",
    "chars": 2945,
    "preview": "/**\n * In a directed graph, we start at some node and every turn, walk along a\n * directed edge of the graph.  If we rea"
  },
  {
    "path": "src/FindKClosestElements658.java",
    "chars": 4648,
    "preview": "/**\n * Given a sorted array, two integers k and x, find the k closest elements to x\n * in the array. The result should a"
  },
  {
    "path": "src/FindKPairsWithSmallestSums373.java",
    "chars": 4211,
    "preview": "/**\n * You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k.\n *\n * Define a pair "
  },
  {
    "path": "src/FindKthSmallestPairDistance719.java",
    "chars": 1930,
    "preview": "/**\n * Given an integer array, return the k-th smallest distance among all the\n * pairs. The distance of a pair (A, B) i"
  },
  {
    "path": "src/FindLargestValueInEachTreeRow515.java",
    "chars": 1751,
    "preview": "/**\n * You need to find the largest value in each row of a binary tree.\n * \n * Example:\n * Input: \n * \n *           1\n *"
  },
  {
    "path": "src/FindMedianFromDataStream295.java",
    "chars": 6871,
    "preview": "/**\n * Median is the middle value in an ordered integer list. If the size of the\n * list is even, there is no middle val"
  },
  {
    "path": "src/FindMinimumInRotatedSortedArray153.java",
    "chars": 1746,
    "preview": "/**\n * Suppose an array sorted in ascending order is rotated at some pivot unknown\n * to you beforehand.\n * \n * (i.e.,  "
  },
  {
    "path": "src/FindMinimumInRotatedSortedArrayII154.java",
    "chars": 1476,
    "preview": "/**\n * Suppose an array sorted in ascending order is rotated at some pivot unknown\n * to you beforehand.\n * \n * (i.e.,  "
  },
  {
    "path": "src/FindModeInBinarySearchTree501.java",
    "chars": 3655,
    "preview": "/**\n * Given a binary search tree (BST) with duplicates, find all the mode(s)\n * (the most frequently occurred element) "
  },
  {
    "path": "src/FindPeakElement162.java",
    "chars": 1982,
    "preview": "/**\n * A peak element is an element that is greater than its neighbors.\n *\n * Given an input array where num[i] ≠ num[i+"
  },
  {
    "path": "src/FindTheCelebrity277.java",
    "chars": 4035,
    "preview": "/**\n * Suppose you are at a party with n people (labeled from 0 to n - 1) and among\n * them, there may exist one celebri"
  },
  {
    "path": "src/FindTheDuplicateNumber287.java",
    "chars": 1838,
    "preview": "/**\n * Given an array nums containing n + 1 integers where each integer is between\n * 1 and n (inclusive), prove that at"
  },
  {
    "path": "src/FirstBadVersion278.java",
    "chars": 1460,
    "preview": "/**\n * You are a product manager and currently leading a team to develop a new\n * product. Unfortunately, the latest ver"
  },
  {
    "path": "src/FirstMissingPositive41.java",
    "chars": 3198,
    "preview": "/**\n * Given an unsorted integer array, find the first missing positive integer.\n *\n * For example,\n * Given [1,2,0] ret"
  },
  {
    "path": "src/FirstUniqueCharacterInAString387.java",
    "chars": 3712,
    "preview": "/**\n * Given a string, find the first non-repeating character in it and return it's\n * index. If it doesn't exist, retur"
  },
  {
    "path": "src/FizzBuzz412.java",
    "chars": 1105,
    "preview": "/**\n * Write a program that outputs the string representation of numbers from 1 to n.\n * \n * But for multiples of three "
  },
  {
    "path": "src/Flatten2DVector251.java",
    "chars": 1433,
    "preview": "/**\n * Implement an iterator to flatten a 2d vector.\n * \n * Example:\n * \n * Input: 2d vector =\n * [\n *   [1,2],\n *   [3]"
  },
  {
    "path": "src/FlattenBinaryTreeToLinkedList114.java",
    "chars": 3718,
    "preview": "/**\n * Given a binary tree, flatten it to a linked list in-place.\n *\n * For example,\n * Given\n *         1\n *        / \\"
  },
  {
    "path": "src/FlipGame293.java",
    "chars": 1154,
    "preview": "/**\n * You are playing the following Flip Game with your friend: Given a string\n * that contains only these two characte"
  },
  {
    "path": "src/FlippingAnImage832.java",
    "chars": 1890,
    "preview": "/**\n * Given a binary matrix A, we want to flip the image horizontally, then invert\n * it, and return the resulting imag"
  },
  {
    "path": "src/FourSum18.java",
    "chars": 5532,
    "preview": "/**\n * Given an array nums of n integers and an integer target, are there elements\n * a, b, c, and d in nums such that a"
  },
  {
    "path": "src/FourSumII454.java",
    "chars": 2437,
    "preview": "/**\n * Given four lists A, B, C, D of integer values, compute how many tuples\n * (i, j, k, l) there are such that A[i] +"
  },
  {
    "path": "src/FractionToRecurringDecimal166.java",
    "chars": 2968,
    "preview": "/**\n * Given two integers representing the numerator and denominator of a fraction,\n * return the fraction in string for"
  },
  {
    "path": "src/FriendCircles547.java",
    "chars": 2098,
    "preview": "/**\n * There are N students in a class. Some of them are friends, while some are not.\n * Their friendship is transitive "
  },
  {
    "path": "src/FrogJump403.java",
    "chars": 2266,
    "preview": "/**\n * A frog is crossing a river. The river is divided into x units and at each\n * unit there may or may not exist a st"
  },
  {
    "path": "src/GameOfLife289.java",
    "chars": 5171,
    "preview": "/**\n * According to the Wikipedia's article: \"The Game of Life, also known simply\n * as Life, is a cellular automaton de"
  },
  {
    "path": "src/GeneralizedAbbreviation320.java",
    "chars": 2359,
    "preview": "/**\n * Write a function to generate the generalized abbreviations of a word. \n * \n * Note: The order of the output does "
  },
  {
    "path": "src/GenerateParentheses22.java",
    "chars": 3189,
    "preview": "/**\n * Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.\n * For ex"
  },
  {
    "path": "src/GraphValidTree261.java",
    "chars": 4065,
    "preview": "/**\n * Given n nodes labeled from 0 to n-1 and a list of undirected edges (each\n * edge is a pair of nodes), write a fun"
  },
  {
    "path": "src/GroupAnagrams49.java",
    "chars": 1780,
    "preview": "/**\n * Given an array of strings, group anagrams together.\n *\n * For example, given: [\"eat\", \"tea\", \"tan\", \"ate\", \"nat\","
  },
  {
    "path": "src/GroupShiftedStrings249.java",
    "chars": 2425,
    "preview": "/**\n * Given a string, we can \"shift\" each of its letter to its successive letter,\n * for example: \"abc\" -> \"bcd\". We ca"
  },
  {
    "path": "src/GuessNumberHigherOrLowerII375.java",
    "chars": 3109,
    "preview": "/**\n * We are playing the Guess Game. The game is as follows:\n * \n * I pick a number from 1 to n. You have to guess whic"
  },
  {
    "path": "src/GuessTheWord843.java",
    "chars": 3846,
    "preview": "/**\n * This problem is an interactive problem new to the LeetCode platform.\n * \n * We are given a word list of unique wo"
  },
  {
    "path": "src/HIndex274.java",
    "chars": 4703,
    "preview": "/**\n * Given an array of citations (each citation is a non-negative integer) of a\n * researcher, write a function to com"
  },
  {
    "path": "src/HandOfStraights846.java",
    "chars": 3044,
    "preview": "/**\n * Alice has a hand of cards, given as an array of integers.\n * \n * Now she wants to rearrange the cards into groups"
  },
  {
    "path": "src/HappyNumber202.java",
    "chars": 1814,
    "preview": "/**\n * Write an algorithm to determine if a number is \"happy\".\n * \n * A happy number is a number defined by the followin"
  },
  {
    "path": "src/HighestPopulationYear.java",
    "chars": 2752,
    "preview": "/**\n * Given a list of people with their birth and death years, find the year with the highest population.\n */\n\nimport j"
  },
  {
    "path": "src/HouseRobber198.java",
    "chars": 1239,
    "preview": "/**\n * You are a professional robber planning to rob houses along a street. Each\n * house has a certain amount of money "
  },
  {
    "path": "src/HouseRobberII213.java",
    "chars": 2338,
    "preview": "/**\n * Note: This is an extension of House Robber.\n *\n * After robbing those houses on that street, the thief has found "
  },
  {
    "path": "src/HouseRobberIII337.java",
    "chars": 2116,
    "preview": "/**\n * The thief has found himself a new place for his thievery again. There is only\n * one entrance to this area, calle"
  },
  {
    "path": "src/ImageSmoother661.java",
    "chars": 1684,
    "preview": "/**\n * Given a 2D integer matrix M representing the gray scale of an image, you\n * need to design a smoother to make the"
  },
  {
    "path": "src/ImplementMagicDictionary676.java",
    "chars": 5659,
    "preview": "/**\n * Implement a magic directory with buildDict, and search methods.\n * \n * For the method buildDict, you'll be given "
  },
  {
    "path": "src/ImplementQueueUsingStacks232.java",
    "chars": 2264,
    "preview": "/**\n * Implement the following operations of a queue using stacks.\n * \n * push(x) -- Push element x to the back of queue"
  },
  {
    "path": "src/ImplementStackusingQueues225.java",
    "chars": 3372,
    "preview": "/**\n * Implement the following operations of a stack using queues.\n * \n * push(x) -- Push element x onto stack.\n * pop()"
  },
  {
    "path": "src/ImplementStrStr28.java",
    "chars": 1534,
    "preview": "/**\n * Implement strStr(). http://www.cplusplus.com/reference/cstring/strstr/\n *\n * Return the index of the first occurr"
  },
  {
    "path": "src/ImplementTriePrefixTree208.java",
    "chars": 4631,
    "preview": "/**\n * Implement a trie with insert, search, and startsWith methods.\n * \n * Example:\n * \n * Trie trie = new Trie();\n * \n"
  },
  {
    "path": "src/IncreasingSubsequences491.java",
    "chars": 1438,
    "preview": "/**\n * Given an integer array, your task is to find all the different possible\n * increasing subsequences of the given a"
  },
  {
    "path": "src/IncreasingTripletSubsequence334.java",
    "chars": 1971,
    "preview": "/**\n * Given an unsorted array return whether an increasing subsequence of length\n * 3 exists or not in the array.\n *\n *"
  },
  {
    "path": "src/InorderSuccessorInBST285.java",
    "chars": 2623,
    "preview": "/**\n * Given a binary search tree and a node in it, find the in-order successor of\n * that node in the BST.\n *\n * Note: "
  },
  {
    "path": "src/InsertDeleteGetRandomOOne380.java",
    "chars": 5377,
    "preview": "/**\n * Design a data structure that supports all following operations in average\n * O(1) time.\n *\n * insert(val): Insert"
  },
  {
    "path": "src/InsertInterval57.java",
    "chars": 1880,
    "preview": "/**\n * Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).\n *\n * Yo"
  },
  {
    "path": "src/InsertIntoACyclicSortedList.java",
    "chars": 3090,
    "preview": "/**\n * Given a node from a cyclic linked list which is sorted in ascending order,\n * write a function to insert a value "
  },
  {
    "path": "src/InsertionSortList147.java",
    "chars": 2014,
    "preview": "/**\n * Sort a linked list using insertion sort.\n */\n\n/**\n * Definition for singly-linked list.\n * public class ListNode "
  },
  {
    "path": "src/IntegerBreak343.java",
    "chars": 1244,
    "preview": "/**\n * Given a positive integer n, break it into the sum of at least two positive\n * integers and maximize the product o"
  },
  {
    "path": "src/IntegerToEnglishWords273.java",
    "chars": 1769,
    "preview": "/**\n * Convert a non-negative integer to its english words representation. Given\n * input is guaranteed to be less than "
  },
  {
    "path": "src/IntegerToRoman12.java",
    "chars": 3233,
    "preview": "/**\n * Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.\n * \n * Symbol       Value\n * I"
  },
  {
    "path": "src/InterleavingString97.java",
    "chars": 4360,
    "preview": "/**\n * Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.\n *\n * For example,\n * Given:\n * s1 "
  },
  {
    "path": "src/IntersectionOfTwoArrays349.java",
    "chars": 1792,
    "preview": "/**\n * Given two arrays, write a function to compute their intersection.\n * \n * Example:\n * Given nums1 = [1, 2, 2, 1], "
  },
  {
    "path": "src/IntersectionOfTwoArraysII350.java",
    "chars": 3392,
    "preview": "/**\n * Given two arrays, write a function to compute their intersection.\n *\n * Example:\n * Given nums1 = [1, 2, 2, 1], n"
  },
  {
    "path": "src/IntersectionOfTwoLinkedLists160.java",
    "chars": 4000,
    "preview": "/**\n * Write a program to find the node at which the intersection of two singly linked lists begins.\n *\n * For example, "
  },
  {
    "path": "src/Interval.java",
    "chars": 184,
    "preview": "/**\n * Definition for an interval.\n */\n\npublic class Interval {\n    int start;\n    int end;\n    Interval() { start = 0; "
  },
  {
    "path": "src/InvertBinaryTree226.java",
    "chars": 726,
    "preview": "/**\n * Invert a binary tree.\n *\n *      4\n *    /   \\\n *   2     7\n *  / \\   / \\\n * 1   3 6   9\n *\n * to\n *\n *      4\n *"
  },
  {
    "path": "src/IsGraphBipartite785.java",
    "chars": 3845,
    "preview": "/**\n * Given an undirected graph, return true if and only if it is bipartite.\n * \n * Recall that a graph is bipartite if"
  },
  {
    "path": "src/IsSubsequence392.java",
    "chars": 2390,
    "preview": "/**\n * Given a string s and a string t, check if s is subsequence of t.\n * \n * You may assume that there is only lower c"
  },
  {
    "path": "src/IslandPerimeter463.java",
    "chars": 2384,
    "preview": "/**\n * You are given a map in form of a two-dimensional integer grid where 1\n * represents land and 0 represents water. "
  },
  {
    "path": "src/IsomorphicStrings205.java",
    "chars": 2906,
    "preview": "/**\n * Given two strings s and t, determine if they are isomorphic.\n * \n * Two strings are isomorphic if the characters "
  }
]

// ... and 396 more files (download for full content)

About this extraction

This page contains the full source code of the fluency03/leetcode-java GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 596 files (1.8 MB), approximately 509.0k tokens, and a symbol index with 3448 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!