Skip to content

Instantly share code, notes, and snippets.

@suzaku
suzaku / x.py
Created October 11, 2012 03:56
"""This would outputs
x
True
__main__
False
"""
import x
  • stable sorting algorithms maintain the relative order of records with equal keys
  • A comparison sort examines the data only by comparing two elements with a comparison operator
  • Many integer sorting algorithms are based on the assumption that the key size "n" is large enough that all entries have unique key values, and hence that n << 2k, where << means "much less than."
  • different functions with the same growth rate may be represented using the same O notation.
  • If f(x) is a sum of several terms, the one with the largest growth rate is kept, and all others omitted.
  • If f(x) is a product of several factors, any constants (terms in the product that do not depend on x) are omitted.
@suzaku
suzaku / gist:3786423
Created September 26, 2012 06:25
About Graph
  • Simple Graph

  • Undirected

  • has no loops

  • no more than one edge between any two different vertices

  • Regular Graph

    • each vertex has the same number of neighbors
  • Complete Graph

  • each pair of vertices has an edge connecting them

@suzaku
suzaku / R1Page.md
Created September 25, 2012 06:07
Model Thinking Note
  • In confronting complex situations, no single model can capture everything. Thus, we need to bring several of models to bear, not just one

  • as powerful as models may be, they’re only guides to thinking. We have to maintain contact with reality.