Notes on Analysis of Algorithms