Analyzing an Algorithm