2.1 Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Computational Thinking

A

Breaking down a problem into manageable steps and developing into an algorithm to solve with.

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

Abstraction

A

Filtering out the characteristics of a problem that are not needed in order to concentrate on those that are needed.

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

Decomposition

A

Breaking down a large problem into smaller sub-problems.

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

Algorithmic thinking

A

Identifying the steps involved in solving a problem.

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

Linear Search

A

Each item in the list is checked and parsed through in order.

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

Binary search

A

An ordered list is divided into two parts with each comparison.

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

Bubble Sort

A

Moving through a list repeatedly , swapping elements that are in the wrong order.

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

Merge sort

A

A list is splint into smaller lists (2 elements ) and then are combined and ordered.

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

List

A

A collection of data with a single identifier.

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

Insertion Sort

A

Each item takes it turns , compare to the items in a sorted list and placed in the correct position.

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

Algorithm

A

The series of steps to solve a problem or perform an action.

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

Flowchart

A

A diagram that shows the inputs, outputs and processes in an algorithm.

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

Process

A

An action that takes place .

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

Pseudocode

A

Simplified programming code that is not language specific , used to design algorithms.

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

Trace Table

A

A table that follows the values of a variable to check for accuracy.

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

What is the symbol for a process ?

A

Rectangle = An action

17
Q

What is the symbol for a subroutine ?

A

Rectangle + bars

18
Q

What is the symbol for an Input/Output ?

A

Parallelogram

19
Q

What is the symbol for a decision ?

A

Diamond

20
Q

What is the symbol for a terminator ?

A

Oval = start/stop

21
Q

What are the two types of error ?

A
  • Syntax
  • Logic
22
Q

What is a syntax error ?

A

code written does not follow the grammatical and format rules of the programming language

23
Q

What is a logic error ?

A

error in the way a program works

24
Q

How does a binary search work ?

A
  • set the counter to middle pos of list
  • value = match means the search ends
  • if midpoint value is < value , list split in 2 and bottom half ignored
    -if midpoint value > value , list split in 2 and top half ignored
  • Repeat until value is found
25
Q

How does a linear search work ?

A

-each item of data is examined until a match is made.

-Once the item is found, the search ends.

26
Q

What does a binary search require ?

A

An ordered list

27
Q

Do values in list have to be ordered to perform linear search ?

A

NO

28
Q

How does a bubble sort work ?

A
  • Start at the beginning of the list
  • Compare first and second value , swap
  • Repeat until no more items to compare
29
Q

How does a merge sort work ?

A
  • List is divided into individual elements bu
    splitting into two until elements are singular
    -Pairs of elements compared , placed into order and combined until list becomes one
30
Q

How does an insertion sort work ?

A
  • Compares values in turn, start with 2nd value
  • the greater value shifts to the right and repeats