Deck 8: Searching and Sorting Arrays

ملء الشاشة (f)
exit full mode
سؤال
Using a binary search, you are more likely to find an item than if you use a linear search.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A(n) ________ search uses a loop to sequentially step through an array.

A) binary
B) unary
C) linear
D) relative
E) None of these
سؤال
The _________ is adequate for searching through small arrays.

A) binary search
B) linear search
C) unary search
D) bubble sort
E) None of these
سؤال
A ________ algorithm is a method of locating a specific item of information in a larger collection of data.

A) sort
B) search
C) standard
D) linear
E) None of these
سؤال
When an array is sorted from highest to lowest, it is said to be in _____ order.

A) reverse
B) forward
C) descending
D) ascending
E) None of these
سؤال
The bubble sort is an easy way to arrange data into ascending order, but it cannot arrange data into descending order.
سؤال
Array elements must be _________ before a binary search can be performed.

A) summed
B) set to zero
C) sorted
D) positive numbers
E) None of these
سؤال
Data that is sorted in ascending order is ordered

A) from lowest to highest value
B) from highest to lowest value
C) always with a binary sort algorithm
D) always with a linear sort algorithm
E) None of these
سؤال
In the average case, an item is just as likely to be found near the beginning of an array as near the end.
سؤال
Using a linear search to find a value that is stored in the last element of an array of 20,000 elements, ____________ element(s) must be compared.

A) 20,000
B) only the first
C) only half
D) 2000
E) None of these
سؤال
The _________ sort usually performs fewer exchanges than the ________ sort.

A) bubble, selection
B) binary, linear
C) selection, bubble
D) ANSI, ASCII
E) None of these
سؤال
Before you can perform a bubble sort, the data must be stored in descending order.
سؤال
A(n) ________ search is more efficient than a(n) ________ search

A) character, string
B) integer, double
C) binary, linear
D) linear, binary
E) None of these
سؤال
A linear search can only be implemented with integer values.
سؤال
Regardless of the algorithm being used, a search through an array is always performed

A) from lowest to highest element
B) from highest to lowest element
C) beginning with the middle element
D) using a binary search
E) None of these
سؤال
A binary search begins with the _________ element of an array.

A) first
B) last
C) largest
D) middle
E) None of these
سؤال
The advantage of a linear search is its ____________.

A) complexity
B) efficiency
C) simplicity
D) speed
E) None of these
سؤال
The number of comparisons made by a binary search is expressed in powers of two.
سؤال
___________ algorithms are used to arrange random data into some order.

A) Standard search
B) Linear
C) Sorting
D) Binary search
E) None of these
سؤال
Before you can perform a selection sort, the data must be stored in ascending order.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/20
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Searching and Sorting Arrays
1
Using a binary search, you are more likely to find an item than if you use a linear search.
False
2
A(n) ________ search uses a loop to sequentially step through an array.

A) binary
B) unary
C) linear
D) relative
E) None of these
C
3
The _________ is adequate for searching through small arrays.

A) binary search
B) linear search
C) unary search
D) bubble sort
E) None of these
B
4
A ________ algorithm is a method of locating a specific item of information in a larger collection of data.

A) sort
B) search
C) standard
D) linear
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
5
When an array is sorted from highest to lowest, it is said to be in _____ order.

A) reverse
B) forward
C) descending
D) ascending
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
6
The bubble sort is an easy way to arrange data into ascending order, but it cannot arrange data into descending order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
7
Array elements must be _________ before a binary search can be performed.

A) summed
B) set to zero
C) sorted
D) positive numbers
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
8
Data that is sorted in ascending order is ordered

A) from lowest to highest value
B) from highest to lowest value
C) always with a binary sort algorithm
D) always with a linear sort algorithm
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
9
In the average case, an item is just as likely to be found near the beginning of an array as near the end.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
10
Using a linear search to find a value that is stored in the last element of an array of 20,000 elements, ____________ element(s) must be compared.

A) 20,000
B) only the first
C) only half
D) 2000
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
11
The _________ sort usually performs fewer exchanges than the ________ sort.

A) bubble, selection
B) binary, linear
C) selection, bubble
D) ANSI, ASCII
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
12
Before you can perform a bubble sort, the data must be stored in descending order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
13
A(n) ________ search is more efficient than a(n) ________ search

A) character, string
B) integer, double
C) binary, linear
D) linear, binary
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
14
A linear search can only be implemented with integer values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
15
Regardless of the algorithm being used, a search through an array is always performed

A) from lowest to highest element
B) from highest to lowest element
C) beginning with the middle element
D) using a binary search
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
16
A binary search begins with the _________ element of an array.

A) first
B) last
C) largest
D) middle
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
17
The advantage of a linear search is its ____________.

A) complexity
B) efficiency
C) simplicity
D) speed
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
18
The number of comparisons made by a binary search is expressed in powers of two.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
19
___________ algorithms are used to arrange random data into some order.

A) Standard search
B) Linear
C) Sorting
D) Binary search
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
20
Before you can perform a selection sort, the data must be stored in ascending order.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 20 في هذه المجموعة.