FBISE, NCP & NBF-aligned resources for Classes 9–12

Computer 11th

Computer 11th Chap 2 : Topic 2.4

/21

Report a question

You cannot submit an empty report. Please add some details.

Computer Chapter 2 : Topic 2.4

Applying Linear Search, Binary Search, Insertion Sort and Bubble Sort

1 / 21

A linear search is applied to the list $\mathbf{\lbrack 18,\ 7,\ 25,\ 11,\ 32,\ 9\rbrack}$ to find $\mathbf{11}$. Using 1-based positions, where is the value found?

2 / 21

Binary search is applied to the sorted list $\mathbf{\lbrack 4,\ 9,\ 13,\ 18,\ 24,\ 31,\ 3}\mathbf{7\rbrack}$ to find $\mathbf{31}$. Which value is examined first?

3 / 21

Binary search is used to find $\mathbf{42}$ in the sorted list $\mathbf{\lbrack}\mathbf{6,\ 12,\ 19,\ 27,\ 35,\ 42,\ 51\rbrack}$. Which sequence of values is examined?

4 / 21

Binary search is performed on $\mathbf{\lbrack 3,\ 8,\ 14,\ 21,\ 29,\ 36,\ 44,\ 52\rbrack}$ to find $\mathbf{10}$. Which values may be compared before the search ends unsuccessfully?

5 / 21

A programmer must immediately search for $\mathbf{17}$ in the unsorted list $\mathbf{\lbrack 23,\ 5,\ 17,\ 9,\ 31,\ 12\rbrack}$. Which algorithm can be applied without first rearranging the list?

6 / 21

The list $\mathbf{\lbrack 28,\ 11,\ 35,\ 7,\ 19,\ 42,\ 15\rbrack}$ will be searched hundreds of times for different values. Which approach is generally more suitable?

7 / 21

Bubble sort arranges $\mathbf{\lbrack 7,\ 3,\ 9,\ 2,\ 6\rbrack}$ in ascending order. What is the list after the first complete pass?

8 / 21

During the first pass of bubble sort on $\mathbf{\lbrack 12,\ 5,\ 8,\ 3,\ 10\rbrack}$, how many adjacent comparisons are performed?

9 / 21

Bubble sort is applied to $\mathbf{\lbrack 5,\ 1,\ 4,\ 2,\ 8\rbrack}$. What is the list after the second complete pass?

10 / 21

An optimized bubble sort processes the list $\mathbf{\lbrack 2,\ 5,\ 9,\ 13,\ 18\rbrack}$. What should happen after its first pass?

11 / 21

Insertion sort is applied to $\mathbf{\lbrack 9,\ 4,\ 7,\ 2,\ 6\rbrack}$. What is the list after the first three elements have been processed?

12 / 21

Insertion sort processes $\mathbf{\lbrack 8,\ 3,\ 6,\ 1,\ 5\rbrack}$ in ascending order. What is the list immediately after inserting 1 into the sorted portion?

13 / 21

While insertion sorting $\mathbf{\lbrack 2,\ 5,\ 7,\ 9,\ 4\rbrack}$, how many existing values shift to the right when $\mathbf{4}$ is inserted?

14 / 21

Selection sort is applied to $\mathbf{\lbrack 29,\ 10,\ 14,\ 37,\ 13\rbrack}$. What is the list after the first pass?

15 / 21

Selection sort is used on $\mathbf{\lbrack 20,\ 12,\ 10,\ 15,\ 2\rbrack}$. What is the list after two complete passes?

16 / 21

The records $\mathbf{\lbrack 7A,\ 3B,\ 7C,\ 2D\rbrack}$ are sorted by their numeric values using a stable sorting algorithm. Which result correctly preserves the original order of equal values?

17 / 21

Bubble sort is modified to arrange $\mathbf{\lbrack 4,\ 9,\ 2,\ 7,\ 5\rbrack}$ in descending order. What is the list after the first complete pass?

18 / 21

Insertion sort arranges $\mathbf{\lbrack 6,\ 10,\ 4,\ 8,\ 2\rbrack}$ in descending order. What is the list after processing the first three elements?

19 / 21

Binary search is used to find $\mathbf{16}$ in $\mathbf{\lbrack 2,\ 5,\ 9,\ 12,\ 16,\ 20,\ 27,\ 31,\ 38\rbrack}$. After first comparing with $\mathbf{16}$, what happens?

20 / 21

Consider the nearly sorted list $\mathbf{\lbrack 2,\ 4,\ 6,\ 8,\ 10,\ 9,\ 12\rbrack}$. Which sorting algorithm is likely to perform efficiently?

21 / 21

An algorithm transforms the list as follows:
$\mathbf{\lbrack 8,\ 3,\ 6,\ 2\rbrack}$
$\mathbf{\lbrack 3,\ 8,\ 6,\ 2\rbrack}$
$\mathbf{\lbrack 3,\ 6,\ 8,\ 2\rbrack}$
$\mathbf{\lbrack 2,\ 3,\ 6,\ 8\rbrack}$
Which sorting algorithm is being demonstrated?

Your score is

0%