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コード
削除
自動保存:
を復元しますか?