正在加载图片...
上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Strategy 1:Linear Search If the data is sorted in ascending order (lowest to highest),we can skip checking some of the data. As soon as a value is encountered that is greater than the target value,the linear search can be stopped without looking at the rest of the data. On average,this will save us about half the work. 1212 Strategy 1: Linear Search • If the data is sorted in ascending order (lowest to highest), we can skip checking some of the data. • As soon as a value is encountered that is greater than the target value, the linear search can be stopped without looking at the rest of the data. • On average, this will save us about half the work
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有