Skip to content

hlxwell/leetcode-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bad Smell

  1. 当 linear search 的时候。
  2. 当需要排序的时候。
  3. 当碰到 n^2 的复杂度的时候。

动态规划3种方法

  1. 递归
  2. Hash记忆结果
  3. 自下而上迭代

经验

  1. 画图,一步一步的画图
  2. 简单的公式化
  3. 写代码

各种Tags

  • Array
  • Hash Table
  • Linked List
  • Two Pointers
  • String
  • Binary Search
  • Dynamic Programming
  • Stack
  • Heap
  • Sort
  • Bit Manipulation
  • Tree
  • Depth-first search
  • Breadth-first search
  • Graph
  • Trie
  • Queue
  • Binary Indexed Tree
  • Segment Tree
  • Binary Search Tree
  • Recursion
  • Math
  • Union Find
  • Design
  • Greedy
  • Divide and Conquer
  • Backtracking
  • Topological Sort
  • Brainteaser
  • Memoization
  • Minimax

设计递归方法的原则

  1. 必须找到递归结束状态
  2. 如何分解参数,并且向下递归

About

Just for having fun to do some leetcode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages