Lesson 3 (MIDTERM) Flashcards

(14 cards)

1
Q

Is as simple comparison-based algorithm where each pair of adjacent elements is compared and swapped if they are in the wrong order

A

Bubble Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It repeatedly steps through the list
Compares adjacent elements
Swaps them if they are in the wrong order

A

Bubble Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where is Bubble Sort Used?

A

Educational Settings
Small Datasets
Debugging tools
Learning Purposes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

to introduce sorting algorithms

A

Educational Settings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

where performance is not critical

A

Small Datasets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

where simplicity is needed

A

Debugging tools

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

to teach the concept of comparison and swapping

A

Learning Purposes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is a simple comparison-based sorting algorithm that repeatedly selects the minimum element from the unsorted part of the list and places it at the beginning.

A

Selection Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

It divides the array into two parts: sorted and unsorted
At each iteration, the smallest (or largest) element from the unsorted section is moved to the sorted section.
This process continues until all elements are sorted

A

Selection Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the Application of Selection Sort

A

Small Datasets
Embedded Systems
Teaching & Education
Data with high cost of swapping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Efficient for sorting a limited number of elements

A

Small Datasets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Low memory usage is an advantage
Embedded Systems

A

Embedded Systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Easy to understand for learning sorting fundamentals

A

Teaching & Education

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Fewer swaps compared to other basic sorts like bubble sort.

A

Data with high cost of swapping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly