正在加载图片...
上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Comparing Algorithms One way to conduct the test would be to code up the algorithms and try them on varying sized lists, noting the runtime. Linear search is generally faster for lists of length 10 or less There was little difference for lists of 10-1000 - Binary search is best for 1000+(for one million list elements,binary search averaged .0003 seconds while linear search averaged 2.5 second) 1919 Comparing Algorithms • One way to conduct the test would be to code up the algorithms and try them on varying sized lists, noting the runtime. – Linear search is generally faster for lists of length 10 or less – There was little difference for lists of 10-1000 – Binary search is best for 1000+ (for one million list elements, binary search averaged .0003 seconds while linear search averaged 2.5 second)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有