Common Fundamental Algorithms Flashcards

Learn how to use composite variables to store multiple values and explore efficient methods for searching and sorting data (18 cards)

1
Q

array

A

As a data structure where data elements are contiguous and given an index number for accessing elements.

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

binary search

A

The process of comparing the middle value in a sorted array or list to the target value, eliminating the half of the list that can’t contain the target value, selecting the middle value of the remaining elements and repeating the process until the target value is found or the search space is empty.

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

bubble sort

A

A sorting algorithm where adjacent elements are compared in pairs and swapped if out of order. The process is reiterated until all elements are sorted.

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

concrete step

A

A step in an algorithm that gives specific instructions on what to do.

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

count-controlled loop

A

any loop whose stop condition is met through a predictable count.

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

desk checking

A

Manually going through an algorithm step-by-step on paper, acting like the computer to verify logic and expected results before running code.

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

event-controlled loop

A

A loop whose stop condition is determined by when an event becomes true or false, and the number of iterations is not determined by a count.

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

heterogeneous

A

When data are not of the same type.

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

homogenous

A

When data are of the same type.

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

index

A

A numeric position identifier for elements in a list or array. Can start at 0 or 1.

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

insertion sort

A

When you sort the first two elements, add the next element and insert it into its correct place among the already-sorted elements. You keep adding elements and inserting them into the correct position until the entire array is sorted.

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

processing

A

the act of performing operations on data according to a set of instructions to achieve a desired result

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

record

A

a composite variable that’s treated as a single unit of data and made up of multiple fields consisting of any data type.

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

searching

A

the process of finding a specific item or value within a collection of data

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

selection sort

A

Select the first element, assume it to be sorted, ccompare to all subsequent elements and swap with smallest element found if it’s smaller than the first element. Then select sequentially through the remaining elements, repeating the same process until the list is sorted

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

sequential search (linear search)

A

a search algorithm that compares elements sequentially to the target value until the value is found or the list ends.

17
Q

sorting

A

the process of arranging data in a particular order, such as ascending or descending

18
Q

string

A

A sequence of any characters that are treated as a single piece of data.