Skip to content

judening/leetcode

Repository files navigation

LeetCodeOJ

Solutions to the leetcode problems

-Already Summarized:

  1. singleNumber.py

  2. maxDepth.py

  3. sameTree.py

  4. maxProfitII.py (best time to buy and sell stock II)

  5. uniqueBinarySearchTree.py

  6. linkedListCycle.py

  7. preorderTraversal.py (BST)

  8. inorderTraversal.py (BST)

  9. nextRightPointers.py (Tree)

  10. searchInsertPosition.py

  11. removeDuplicatesFromSortedList.py

  12. reverseInteger.py

  13. maximumSubarray.py

  14. romanToInteger.py

  15. climbStairs.py

  16. integerToRoman.py

  17. covertSortedArrayToBST.py

  18. mergeTwoSortedLists.py

  19. removeElement.py

  20. swapNodesInPairs.py

  21. balancedBinaryTree.py

  22. sortColors.py (bucket sort)

  23. grayCode.py (DP)

  24. findMinInRotatedSortedArray.py

  25. uniquePaths.py

  26. removeDuplicatesFromSortedArray.py (twoPointers)

  27. findPeakElement.py

  28. generateParentheses.py

  29. permute.py

  30. maxProfit.py (Best Time to Buy and Sell Stock)

  31. removeNthNodeFromEndOfList (Recursion && Two Pointers)

  32. isValidBST

  33. reverseWords.py

  34. minStack.py

  35. maxProduct.py

  36. evaluateRpn.py

  37. copyRandomList.py

  38. strStr.py (twoPointers slow version and z alg are implemented - need to implement KMP algorithm)

  39. containerWithMostWater.py (slower and faster version)

  40. minimumPathSum.py

  41. rotateImage.py

  42. search2DMatrix.py

  43. plusOne.py

  44. symmetricTree.py

  45. mergedSortedArray.py ( I have an easier version, but didn't get AC by leetcode)

  46. spiralMatrix.py

  47. sqrt.py

  48. wordBreak.py (DFS version, need to implement DP version)

  49. wordBreakII.py (DFS version, DP version)

  50. numDistinct.py (distinct-subsequences)

  51. nQueensII.py (have basic version and advanced version, need FANCY version)

  52. singleNumberII.py (pay extra attention to the solution)

  53. postorderTraversal.py (DFS version and Reverse version, need threaded tree)

  54. stringToInt.py

  55. isValidSudoku.py

  56. solveSudoku.py

  57. recoverBST.py

  58. logestValidParentheses.py

  59. isInterleave.py (The DFS version, need the DB version)

  60. isScramble.py (Got the DFS version, which is a bit tricky, but not the DB version)

  61. largestRectangleArea.py (I got the smart one, need a divide-conquer one)

  62. maxProfitIII.py

  63. isMatch.py (regular expression matching/DP version available, DFS version needed)

  64. logestPalindrom.py (Greedy Algorithm one - n^3,DP n^2 and Manechester ones)

  65. maximalRectangle.py (N^3 solution, need to optimize it)

  66. reverseKGroup

  67. pascalTri.py

  68. pascalTriII.py

  69. twoSum.py (dictionary is pretty weird, see pythonTrick for details)

  70. threeSumClosest.py (read twice)

  71. countAndSay.py

  72. buildTreeInorderPostorder.py

  73. buildTreeInorderPreorder.py

  74. trap.py (two pointers version, need the stack version)

  75. findMinInRotatedSortedArrayII.py

  76. setZeroes.py

  77. insertInterval.py

  78. searchRange.py (I suspect the one i wrote is O(logn), the smart one is def O(logn) tho)

  79. searchInRotatedSortedArrayII.py

  80. jumpGameII.py

  81. threeSum.py

  82. removeDuplicatesFromSortedArrayII.py

  83. fourSum.py

  84. longestConsecutiveSequence.py

  85. uniquePathsII.py

  86. combinationSum2.py

  87. triangle.py

  88. nextPermutation.py (memorize it)

  89. firstMissingPositive.py

  90. mergeIntervals.py

  91. wordSearch.py

  92. combinationSum.py

  93. wordLaddger.py

  94. subsets.py

  95. subsetsWithDup.py

  96. jumpGame.py

  97. searchInRotatedSortedArray.py

  98. uniqueBinarySearchTreeII.py

  99. spiralMatrixII.py

  100. zigZagConversion.py (smart one in pythonTrick, normal one in array)

  101. isValidParentheses.py

  102. findMedianSortedArrays.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages