Skip to content

qijiaqi/Algorithme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithme

Questions algorithmiques sur Leetcode

List of questions:

  1. Add Two Numbers: LinkedList with maths
  2. Longest Substring Without Repeating Characters: SW with O(n^2)
  3. Longest Palindromic Substring: DP with O(n^2) in reverse order
  4. Reverse Integer: overflow & conversion of type
  5. 3Sum: search without duplicate number
  6. Remove Nth Node From End of List: LinkedList with DummyHead
  7. Valid Parentheses: stack
  8. Merge Two Sorted Lists: LinkedList Iteration & Recursion
  9. Next Permutation: regularity
  10. Jump Game II: GR with dynamic loop
  11. Power(x, n): Maths with quick power O(logn)
  12. Maximum Subarray: DP & GR with O(n)
  13. Jump Game: GR with dynamic loop
  14. Minimum Path Sum: DP with O(n^2)
  15. Plus One: Maths with O(n)
  16. Add Binary: Maths with XOR O(n)
  17. Validate Binary Search Tree: BST & RC
  18. Symmetric Tree: BT & RC
  19. Binary Tree Level Order Traversal: BT & queue
  20. Maximum Depth of Binary Tree: BT & RC & queue
  21. Convert Sorted Array to Binary Search Tree: BST & RC
  22. Minimum Depth of Binary Tree: BT & RC & queue
  23. Distinct Subsequences: hard DP with O(n^2) & overflow
  24. Triangle: DP with O(n^2)
  25. Best Time to Buy and Sell Stock: DP with O(n) in different states
  26. Best Time to Buy and Sell Stock II
  27. Best Time to Buy and Sell Stock III
  28. Linked List Cycle: LinkedList with DoublePointer
  29. Maximum Product Subarray: 2 DP with O(n)
  30. Min Stack: Design
  31. Factorial Trailing Zeroes: Maths with O(logn)
  32. Best Time to Buy and Sell Stock IV: DP
  33. Reverse Bits: bit
  34. House Robber: DP with O(n)
  35. Count Primes: Maths with Eratosthenes O(nloglogn)
  36. Reverse Linked List: LinkedList with DummyHead & Stack & DoublePointer
  37. Palindrome Linked List: LinkedList with vector & DoublePointer
  38. Longest Increasing Subsequence: DP with O(n^2)
  39. Best Time to Buy and Sell Stock with Cooldown: DP
  40. Bulb Switcher: maths with square number O(n)
  41. Coin Change: DP with O(n^2)
  42. Water and Jug Problem: DFS & Bézout
  43. Wiggle Subsequence: 2 DP & GR with O(n)
  44. Shuffle an Array: Design
  45. Partition Equal Subset Sum: DP with O(n^2) in reverse order
  46. Coin Change II: DP with O(n^2)
  47. Out of Boundary Paths: DP with O(n^3)
  48. Shortest Unsorted Continuous Subarray: sort with O(n)
  49. Binary Search: BS
  50. Maximum Length of Repeated Subarray: DP with O(n^2)
  51. Minimum Falling Path Sum: DP with O(n^2)
  52. Minimum Falling Path Sum II: hard DP with O(n^2)
  53. Number of Paths with Max Score: hard DP with O(n^2)
  54. Count All Possible Routes: MS (DP & DFS) & hard DP with O(n^3)
  55. Construct the Longest New String : MS & DFS & Math wuth O(1)

Releases

No releases published

Packages

No packages published

Languages