ylqi007 / LeetCode

21 stars 6 forks source link

Facebook #20

Open ylqi007 opened 8 months ago

ylqi007 commented 8 months ago

Top Frequency: Top 10

  1. 314. Binary Tree Vertical Order Traversal [BFS]
  2. 1249. Minimum Remove to Make Valid Parentheses [Stack]
    1. 1963. Minimum Number of Swaps to Make the String Balanced [Stack]
    2. 2116. Check if a Parentheses String Can Be Valid
    3. :white_check_mark: 678. Valid Parenthesis String
  3. :white_check_mark: 408. Valid Word Abbreviation
  4. 339. Nested List Weight Sum [⚠️复杂度分析]
  5. :white_check_mark: 1762. Buildings With an Ocean View
  6. 1650. Lowest Common Ancestor of a Binary Tree III
    1. 235. Lowest Common Ancestor of a Binary Search Tree
    2. 236. Lowest Common Ancestor of a Binary Tree
    3. 1644. Lowest Common Ancestor of a Binary Tree II
    4. 160. Intersection of Two Linked Lists [Two Pointers]
  7. 1570. Dot Product of Two Sparse Vectors
  8. 680. Valid Palindrome II
    1. 125. Valid Palindrome
    2. 1216. Valid Palindrome III [DP]
      1. :white_check_mark: 72. Edit Distance
      2. 516. Longest Palindromic Subsequence
        1. :white_check_mark: https://leetcode.com/problems/longest-palindromic-subsequence/editorial/
  9. :white_check_mark: 227. Basic Calculator II [+-*/]
    1. 224. Basic Calculator
    2. 772. Basic Calculator III
  10. 528. Random Pick with Weight
    1. 398. Random Pick Index 【经典算法题】蓄水池抽样算法
ylqi007 commented 8 months ago

Top Frequency: 11~20

  1. :white_check_mark: 215. Kth Largest Element in an Array
    1. :white_check_mark: 347. Top K Frequent Elements [PriorityQueue(Heap), Quick Select, Bucket sort]
    2. 703. Kth Largest Element in a Stream [PriorityQueue(minHeap)]
    3. 973. K Closest Points to Origin
  2. 71. Simplify Path [Deque, LinkedList, String.split(), Regular Expression]
  3. 791. Custom Sort String
  4. 938. Range Sum of BST
  5. 691. Stickers to Spell Word
    1. 383. Ransom Note
  6. Lowest Common Ancestor
    1. :white_check_mark: 236. Lowest Common Ancestor of a Binary Tree
    2. :white_check_mark: 1644. Lowest Common Ancestor of a Binary Tree II
    3. 1650. Lowest Common Ancestor of a Binary Tree III
      1. 160. Intersection of Two Linked Lists :white_check_mark: editorial
    4. 1676. Lowest Common Ancestor of a Binary Tree IV
    5. 235. Lowest Common Ancestor of a Binary Search Tree [BST]
  7. 426. Convert Binary Search Tree to Sorted Doubly Linked List editorial
    1. 94. Binary Tree Inorder Traversal
  8. 65. Valid Number
  9. 249. Group Shifted Strings [Modulo, HashKey的计算]
    1. :white_check_mark: 49. Group Anagrams String.valueOf(char[] cs)
  10. 50. Pow(x, n) [Binary Exponentiation]
ylqi007 commented 7 months ago

Top Frequency: 21~30

  1. 129. Sum Root to Leaf Numbers
    1. https://leetcode.com/problems/sum-root-to-leaf-numbers/editorial/
    2. Javadocs recommends to use ArrayDeque and not Stack as a stack implementation
    3. 112. Path Sum
    4. 111. Minimum Depth of Binary Tree
  2. 921. Minimum Add to Make Parentheses Valid
    1. 1963. Minimum Number of Swaps to Make the String Balanced
  3. 346. Moving Average from Data Stream [Prefix Sum, Sliding Window]
    1. 2090. K Radius Subarray Averages [Prefix Sum, Sliding Window]
  4. 670. Maximum Swap
  5. 973. K Closest Points to Origin [Divide and Conquer, QuickSort, Quickselecting by a pivot x]
    1. 💯 215. Kth Largest Element in an Array [k-th is 1-indexed, not 0-indexed]
    2. 347. Top K Frequent Elements
    3. 692. Top K Frequent Words
  6. 162. Find Peak Element [Binary Search]
    1. 852. Peak Index in a Mountain Array [Binary Search]
    2. 2210. Count Hills and Valleys in an Array
  7. 560. Subarray Sum Equals K
    1. 523. Continuous Subarray Sum [Prefix Sum]
    2. 713. Subarray Product Less Than K
  8. 708. Insert into a Sorted Circular Linked List
  9. 56. Merge Intervals
  10. 766. Toeplitz Matrix
  11. 827. Making A Large Island
ylqi007 commented 7 months ago

Top Frequency: 31 ~ 35

  1. 199. Binary Tree Right Side View
  2. 301. Remove Invalid Parentheses
    1. 20. Valid Parentheses
    2. 1963. Minimum Number of Swaps to Make the String Balanced
  3. 543. Diameter of Binary Tree
    1. 1522. Diameter of N-Ary Tree
  4. 270. Closest Binary Search Tree Value