势能法 Potential Method
均摊分析 Amortized Analysis
假设我们把每个操作的最大耗时记为f(n),n个操作以后则得到时间上界f(n)⋅n,然而这个界限是不 tight 的,因为一些操作会比其他操作耗时更多。
均摊分析关注于每个操作消耗的平均时间。
Study and Share
假设我们把每个操作的最大耗时记为f(n),n个操作以后则得到时间上界f(n)⋅n,然而这个界限是不 tight 的,因为一些操作会比其他操作耗时更多。
均摊分析关注于每个操作消耗的平均时间。
m is the length of text
n is the length of pattern
Must sacrifice one of three desired features.
Continue reading “算法设计与分析笔记0x10 —— Extending the Limits of Tractability”
P Decision problems solvable in polynomial time.
PSPACE Decision problems solvable in polynomial space.
3D-MATCHING. Given n instructors, n courses, and n times, and a list of the possible courses and times each instructor is willing to teach, is it possible to make an assignment so that all courses are taught at different times?
3D-MATCHING. Given disjoint sets X, Y, and Z, each of size n and a set T ⊆ X × Y × Z of triples, does there exist a set of n triples in T such that each element of X ∪ Y ∪ Z is in exactly one of these triples?
Algorithm design patterns.
Algorithm design anti-patterns.
和单元七一样,直接从课件中整理笔记。
.sort_index()
方法在指定轴上根据索引进行排序,默认升序
.sort_index(axis=0, ascending=True)
由于系统重装之前的笔记没有备份…现在回顾课件重新整理一份,不再重新观看视频。
import pandas as pd
For myself, all commands(and more) used in Atom are wrote down.
Created at 2017-12-12 22:05:51. Maybe I can do better afterwards.