“Data Structures and Algorithm Analysis Note (I)”
Basic Knowledge before learning Algorithm & Data Structures Four basic rules of recursion Base cases Making progress Design rules: Assume that all recursive calls work. Compound Interest Rule: Never duplicate work by solving the same instance of a problem in separate recursive calls. Two most common ways of proving statements: by induction and by contradiction. Modular Arithmetic: A is congruent to B modulo N, written A ≡ B if N divides A – B (The remainder is the same when either A or B is divide by N.