Martin's Blog

Home Archives Categories About tags
2016-01-31
Algorithm

Algorithm Note

  1. Chapter 3 Exercises 6中有两个点, 一个是如果一个图的DFS树中没有出现的边,边的两个顶点一定是祖先与孩子的关系;一个是如果一个图的BFS树的BFS树中没有出现的边,边的两个顶点在BFS树中的层数差不会大于1.
  2. 如果一个图的DFS树,或者BFS树和图相同,那么原图就没有环,否则就找他们最低的祖先,构成一个环。
Share Comments
Newer
Leetcode-Permutations II(Java)
Older
VIM

Categories

  • Algorithm
  • Leetcode
  • Network
  • Web
  • uncategoried

Tags

  • Array
  • BFS
  • BackTracking
  • Backtracing
  • Backtracking
  • Binary Search
  • Bit Manipulation
  • DFS
  • Design
  • Divide and Conquer
  • Dynamic Programming
  • Graph
  • Graph, DFS, BFS
  • Greedy
  • Hash Table
  • Heap
  • Linked List
  • Math
  • Sort
  • Stack
  • String
  • Topological Sort
  • Tree
  • Trie
  • Two Pointers
  • Two Points
  • Union Find

Tag Cloud

Array BFS BackTracking Backtracing Backtracking Binary Search Bit Manipulation DFS Design Divide and Conquer Dynamic Programming Graph Graph, DFS, BFS Greedy Hash Table Heap Linked List Math Sort Stack String Topological Sort Tree Trie Two Pointers Two Points Union Find

Archives

  • March 2016
  • February 2016
  • January 2016

Recents

  • Leetcode Counting Bits(Java)
  • Leetcode Largest Number(Java)
  • Leetcode Reverse Words in a String(Java)
  • Leetcode Wiggle Sort II(Java)
  • Leetcode Range Sum Query 2D - Immutable(Java)
© 2016 Martin
Powered by Hexo
Home Archives Categories About tags