1) Which type of lists or data sets are linear searching algorithms used for? a) Unsorted lists or data sets b) Sorted lists or data sets 2) Which type of lists or data sets are binary searching algorithms used for? a) Unsorted lists or data sets b) Sorted lists or data sets 3) Select the best description to explain what a linear search algorithm is. a) Put the elements in order, check each item in turn. b) Elements do not need to be in order, check each item in turn. c) Put the elements in order, compare with the middle value, split the list in order and repeat. d) Elements do not need to be in order, compare to the middle value, split the list in order and repeat 4) Select the best description to explain what a binary search algorithm is. a) Put the elements in order, check each item in turn. b) Elements do not need to be in order, check each item in turn. c) Put the elements in order, compare with the middle value, split the list in order and repeat. d) Elements do not need to be in order, compare to the middle value, split the list in order and repeat 5) A linear search is to be performed on the list: [12 6 8 1 3]. How many comparisons would it take to find 1? a) 1 b) 3 c) 2 d) 4 6) A binary search is to be performed on the list: [3 5 9 10 23]. How many comparisons would it take to find 9? a) 0-1 b) 4-5 c) 2-3 d) I can't find 9 7) A binary search is to be performed on the list: [1 5 10 13 48 68 100 101]. How many comparisons would it take to find 101? a) -01 b) 3-4 c) 1-2 d) 4-5 8) Describe an advantage of a linear search algorithm a) Data does not need to be in order. b) Can only work on an ordered list. If unordered must use a linear search. c) Performs well over large ordered lists. d) Slow with large data sets. 9) Describe a disadvantage of a linear search algorithm a) Data does not need to be in order. b) Can only work on an ordered list. If unordered must use a linear search. c) Performs well over large ordered lists. d) Slow with large data sets. 10) Describe an advantage of a binary search algorithm a) Data does not need to be in order. b) Can only work on an ordered list. If unordered must use a linear search. c) Performs well over large ordered lists. d) Slow with large data sets. 11) Describe a disadvantage of a binary search algorithm a) Data does not need to be in order. b) Can only work on an ordered list. If unordered must use a linear search. c) Performs well over large ordered lists. d) Slow with large data sets. 12) Describe an advantage of a linear search algorithm a) If the criteria matches the last item in list, entire list has to be checked. b) Quicker than a linear search. c) Simple to code than a binary search. d) Can only work on an ordered list. If unordered must use a linear search. 13) Describe a disadvantage of a linear search algorithm a) If the criteria matches the last item in list, entire list has to be checked. b) Quicker than a linear search. c) Simple to code than a binary search. d) Can only work on an ordered list. If unordered must use a linear search. 14) Describe an advantage of a binary search algorithm a) If the criteria matches the last item in list, entire list has to be checked. b) Quicker than a linear search. c) Simple to code than a binary search. d) Can only work on an ordered list. If unordered must use a linear search. 15) Describe a disadvantage of a binary search algorithm a) If the criteria matches the last item in list, entire list has to be checked. b) Quicker than a linear search. c) Simple to code than a binary search. d) More complicated to code than a linear search.
0%
Searching Algorithms
共用
共用
共用
由
Dprice7
編輯內容
列印
嵌入
更多
作業
排行榜
顯示更多
顯示更少
此排行榜當前是私有的。單擊
共用
使其公開。
資源擁有者已禁用此排行榜。
此排行榜被禁用,因為您的選項與資源擁有者不同。
還原選項
測驗
是一個開放式範本。它不會為排行榜生成分數。
需要登錄
視覺風格
字體
需要訂閱
選項
切換範本
顯示所有
播放活動時將顯示更多格式。
打開結果
複製連結
QR 代碼
刪除
恢復自動保存:
?