2.1.Algorithms Flashcards

1
Q

Linear Search

A

A search algorithm that works by checking each element in a list one by one, and returning the target value when found.

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

Binary Search

A

A more efficient search algorithm that works on sorted lists, where the target value is compared with the midpoint to halve the search space.

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

Midpoint

A

In binary search, the midpoint is calculated using the formula: (LowestIndex + HighestIndex) / 2.

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

Bubble Sort

A

A simple sorting algorithm that compares adjacent elements and swaps them if they are in the wrong order, continuing until no swaps are needed.

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

Pass (Bubble Sort)

A

A single cycle of the Bubble Sort algorithm where each pair of adjacent elements is compared and swapped if necessary.

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

Merge Sort

A

A more efficient sorting algorithm that divides the dataset into smaller sub-sets, then merges them in the correct order.

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

Insertion Sort

A

A sorting algorithm where elements are inserted into their correct position one at a time, by shifting larger elements to the right.

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

Sorting Algorithms

A

Algorithms used to rearrange elements in a list or array into a specific order, such as ascending or descending.

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

Decomposition

A

Breaking a large problem into smaller, manageable sub-problems to make it easier to solve.

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

Abstraction

A

Removing unnecessary details and leaving only the most important aspects of a problem to focus on.

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

Flowchart

A

A diagram used to represent algorithms, with shapes that indicate processes, decisions, and the flow of control.

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

Pseudocode

A

A method of writing algorithms using simple, plain language to describe each step in the process.

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

Efficiency (Algorithms)

A

The performance of an algorithm in terms of time and memory usage, with more efficient algorithms requiring fewer resources.

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

Algorithm

A

A sequence of instructions used to perform a task or solve a problem.

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

Searches

A

The number of comparisons or steps taken by a search algorithm to find a target value in a list.

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

Sorting

A

The process of arranging items in a specific order, typically ascending or descending.

17
Q

Merge Sort Efficiency

A

Merge sort is more efficient than bubble sort and insertion sort when sorting large datasets, but uses more memory.

18
Q

Bubble Sort Efficiency

A

Bubble sort is easier to understand than merge or insertion sort but is very inefficient with longer lists or datasets.

19
Q

Insertion Sort Efficiency

A

Insertion sort is simple to implement but very inefficient with large datasets.

20
Q

Recursive Algorithm

A

An algorithm that calls itself with modified parameters to solve smaller instances of a problem.

21
Q

Divide and Conquer

A

A method used in merge sort where the dataset is divided into smaller sub-datasets, processed separately, and then merged.

22
Q

Big-O Notation

A

A mathematical notation used to describe the performance or complexity of an algorithm in terms of time and space.

23
Q

Best, Worst, and Average Case

A

Terms used to describe the efficiency of an algorithm in different situations: best case (minimum), worst case (maximum), and average case.