正在加载图片...
上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Comparing Algorithms Which search algorithm is better,linear or binary? The linear search is easier to understand and implement The binary search is more efficient since it doesn't need to look at each element in the list Intuitively,we might expect the linear search to work better for small lists,and binary search for longer lists.But how can we be sure? 1818 Comparing Algorithms • Which search algorithm is better, linear or binary? – The linear search is easier to understand and implement – The binary search is more efficient since it doesn’t need to look at each element in the list • Intuitively, we might expect the linear search to work better for small lists, and binary search for longer lists. But how can we be sure?
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有