Algorithms Notes (1) - Analysis

2017-05-05  本文已影响47人  SilentSummer

转载请注明出处:http://www.jianshu.com/p/e535ce1d30ab

The note focuses on analyzing the performance of algorithms with the scientific method.

The note corresponds to Chapter 1.4 of Algorithms, (@Princeton) and Week 1 of Algorithms, Part I, (@Coursera).

Analysis of Algorithms Introduction

Scientific method

Insight. [Knuth 1970s] Use scientific method to understand performance.

Experimental Algorithmics

ExperAlgoExperAlgo

Mathematical Models

Mathematical models for running time.

$$
f(N) \sim g(N) \Longleftrightarrow \lim\limits_{N \to \infty }{\frac{f(N)}{g(N)}} =1
$$

egAlgoegAlgo mathmodelmathmodel

Order-of-Growth Classifications

class1class1 class2class2

Binary Search

Binary search: Java implementation

binsearchbinsearch

Binary search: mathematical analysis

binsearchmathbinsearchmath

Binary search application: 3-SUM

3SUM3SUM

Theory of Algorithms

typestypes notationnotation designdesign

Memory

basicsbasics memorymemory memory2memory2
上一篇 下一篇

猜你喜欢

热点阅读