2.1 algorithms

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

24 Terms

1
New cards

What are the 3 concepts of computational thinking?

  1. Abstraction

  2. Decomposition

  3. Algorithmic thinking

2
New cards

What is abstraction?

The process of only focusing on the relevant and important details, while ignoring the unnecessary ones.

3
New cards

What is decomposition?

The process of breaking down a complex problem into smaller, more manageable subproblems.

4
New cards

What is algorithmic thinking?

The process of creating a step by step solution to a problem.

5
New cards

What is an algorithm?

6
New cards

What is the Input-Process-Output Model?

<p></p>
7
New cards

What is the input in an algorithm?

The data that is entered into the algorithm.

8
New cards

What is the process in an algorithm?

The steps/operations performed on the input data.

9
New cards

What is the output in an algorithm?

The result produced

10
New cards

What is a structure diagram?

A visual representation showing how a problem is broken down into subsections, and how they relate to each other

<p><span><span>A visual representation showing how a problem is broken down into subsections, and how they relate to each other</span></span></p>
11
New cards

What are the 3 ways of representing algorithms?

  • Flowcharts

  • Psuedocode

  • High level programming language

12
New cards

What are the meaning of the flowchart symbols?

knowt flashcard image
13
New cards

What is a syntax error?

An error that occurs when code violates the grammatical rules of a programming language.

14
New cards

What is a logic error?

An error that occurs when a program runs successfully but produces incorrect results.

15
New cards

What is a trace table?

A table used to track the value of variables line by line as a program is run.

<p>A table used to track the value of variables line by line as a program is run.</p>
16
New cards

What do trace tables help find?

Logic errors.

17
New cards

What are the 2 types of search algorithm?

  • Linear search

  • Binary search

18
New cards

What are the steps for a linear search?

  1. Compare first item in the list with the item you are searching for.

  2. If it isn’t the item you are searching for, then compare with the next item in the list.

  3. This is repeated until the item is found or until the end of the list is reached.

19
New cards

What are the steps for a binary search?

  1. Find the midpoint of the list

    • (n + 1) / 2

  2. Compare the item at the midpoint with the item you are searching for.

  3. If the item you are searching for is greater, ignore the lower part of the list.

  4. If the item you are searching for is lesser, ignore the upper part of the list.

  5. This is repeated until the item at the midpoint is the item being searched for.

20
New cards

What is the pre-requisite of a binary search?

The list must be in order.

21
New cards

What are the 3 types of sort algorithm?

  • Bubble sort

  • Merge sort

  • Insertion sort

22
New cards

What are the steps for a bubble sort?

23
New cards

What are the steps for a merge sort?

24
New cards

What are the steps for an insertion sort?