Algorithm:Design and Analysis

update code