Search Header Logo
DCS1101 - Week 13 (Searching & Sorting)

DCS1101 - Week 13 (Searching & Sorting)

Assessment

Presentation

Computers

University

Practice Problem

Medium

Created by

Yasmin Basiran

Used 2+ times

FREE Resource

32 Slides • 10 Questions

1

media

2

media

3

Open Ended

If you are looking for a friend in a crowded hall, what would your strategy be?

4

media

5

media

6

media

7

media

8

media

9

media

10

media

11

media

12

media

13

media

14

media

15

media

16

media

17

media

18

media

19

media

20

media

21

media

22

media

23

I’m thinking of a number between 1 and 100.
You can only ask yes/no questions.

24

Multiple Choice

Linear search works best when the data is

1
sorted and large in size
2
unsorted or small in size
3
randomly ordered and extensive
4
highly structured and complex

25

Multiple Choice

Binary search requires the array to be

1
unordered
2
reversed
3
random
4
sorted

26

Multiple Choice

Which is a drawback of linear search?

1

Utilizes binary search for optimal performance

2

Fast execution for small datasets

3

Guaranteed to find an element in sorted arrays

4

Inefficiency for large datasets

27

Draw

Draw the step-by-step linear search process for finding 15 in:

[4, 8, 12, 15, 21]

28

media

29

media

30

media

31

media

32

media

33

media

34

media

35

media

36

media

37

Multiple Choice

Which algorithm selects the smallest element and puts it at the front?

1
Merge Sort
2
Insertion Sort
3
Selection Sort
4
Bubble Sort

38

Multiple Choice

Best-case scenario of bubble sort is when the list is:

1
Randomly ordered list
2
Partially sorted list
3
List with duplicate values
4
Already sorted list

39

Multiple Choice

Bubble sort repeatedly compares:

1
Non-adjacent elements
2
Adjacent elements
3
Random elements
4
Only the largest elements

40

Draw

Draw the bubble sort on this list:

[6, 3, 8, 2]

41

Draw

Draw how selection sort finds the smallest value in the unsorted portion of this list:

[10, 4, 7, 1, 9]

42

Thank you!

media

Show answer

Auto Play

Slide 1 / 42

SLIDE