analysis of algorithms 3718