Algorithm analysis notes