Skip to content

FernandoZhuang/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedList

  1. Reverse Linked List

Array

1D Array

  1. Sort Array By Parity II: Trick about Even or Odd!
  2. 🔥 Find All Duplicates in an Array: 1) How to use "1" and "2" 2) How to use the relation between key and value.
  3. Queue Reconstruction by Height: Trick about Maximum.
  4. Single Element in a Sorted Array: Binary Search.

2D Array

Traversal

  1. Spiral Matrix III.

Recursion

  1. Number of Enclaves.

Math

  1. 🔥Two City Scheduling:Tricks about "Sum".

2 Array

  1. Interval List Intersections.

Tree

Iteration

  1. N-ary Tree Preorder Traversal
  2. N-ary Tree Postorder Traversal
  3. Binary Tree Inorder Traversal

Recursion

  1. 🔥 Distribute Coins in Binary Tree: Tricks about 1) Move 2) Equal to "Decision".Learn a lot from Lee215.
  2. Flip Equivalent Binary Trees: Two Trees.
  3. Trim a Binary Search Tree: Change the way in which nodes link.
  4. Maximum Difference Between Node and Ancestor: Maxima and Minima during the recursion.

DFS && BFS

  1. 🔥 Maximum Depth of N-ary Tree: 1) BFS On each layer, we count how many nodes there 2) The relation about each recursion.

Graph

Traversal

  1. All Paths From Source to Target: Recursion and Stack implemented by array.

Backtrack

2D Array

  1. Unique Paths III: Recursion.

Greedy

1D Array

  1. Maximize Sum Of Array After K Negations: Lee215.

2D Array

  1. Score After Flipping Matrix: Lee215 is awesome!Without modifing matrix in reality, we can still obtain highest score.

DP

1D Array

  1. Longest Arithmetic Sequence: Lee215 uses "max".
  2. Daily Temperatures

2D Array

  1. Minimum Falling Path Sum.

Operator

  1. Counting Bits.
  2. Single Number: How to use "1" and "2".
  3. Single Number III

Releases

No releases published

Packages

No packages published

Languages