Unit 1 algorithms

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

1/38

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

39 Terms

1
New cards

Algorithms

specific set of instructions for solving a problem or completing a task

2
New cards

abstraction

removing unnecessary details from a problem to focus on essential components

3
New cards

decomposition

breaking down a large problem into smaller sub-problems

4
New cards

Arithmetic operators

+ addition

- subtraction

/ division

* multiply

^ exponent

MOD remainder

DIV integer division

5
New cards

Arithmetic operators in c#

+ addition

- subtraction

/ division

* multiply

^ exponent

% remainder

/ integer division

6
New cards

Flowchart symbols

knowt flashcard image
7
New cards

program structures

sequence, selection, iteration

8
New cards

what is selection?

ability to choose different paths through a program

9
New cards

what is sequence?

series of steps are completed one after the other

10
New cards

what is iteration?

repeating a part of a program, referred to as repetition/looping in flowcharts show through arrows that repeats a part of the flowchart

11
New cards

Pseudo code symbol for less than

< less than

12
New cards

Pseudo code symbol for less than or equal to

knowt flashcard image
13
New cards

Pseudo code symbol for greater than

>

14
New cards

Pseudo code symbol for greater than or equal to

knowt flashcard image
15
New cards

Pseudo code symbol for equal to

=

16
New cards

Pseudo code symbol for assignment

<--

17
New cards

Pseudo code symbol for not equal to

knowt flashcard image
18
New cards

Pseudo code symbol for multiply

*

19
New cards

Pseudo code symbol for addition

+

20
New cards

Pseudo code symbol for division

/

21
New cards

Pseudo code symbol for subtraction

-

22
New cards

Pseudo code symbol for exponent

^

23
New cards

what is IF ELSE?

Branching depending on the condition

24
New cards

USER INPUT

Get user to input

25
New cards

OUTPUT

Outputs to user

26
New cards

FOR

Repeat a set number of times

27
New cards

WHILE

Repeat while a condition is true

28
New cards

REPEAT UNTIL

Do a loop until a condition is true

29
New cards

INT_TO_STRING

converts an integer to a string

30
New cards

STRING_TO_INT

converts a string to an integer

31
New cards

THEN

Executes if condition is true

32
New cards

Iteration is pseudocode

FOR... ENDFOR

WHILE... ENDWHILE

REPEAT... UNTIL

33
New cards

Types of searches

Binary search, linear search

34
New cards

Binary search

Only works on sorted lists, middle item of the list is checked first.

If the item searched for is less than this item, the right side of the list is discarded, and a binary search executed on the left side of the list.

35
New cards

Linear search

If list is not sorted. Items are examined in order

36
New cards

Time tables

The variables can be traced as a program is run, done using a trace table

37
New cards

Types of sorts

Bubble sort, merge sort

38
New cards

Bubble sort

Starts with the left item, compare it with the next item nearest, swap if one item is lower than another, repeat for other items, this is the first pass.

Repeat in second pass until all items are in order.

39
New cards

Merge sort

Divide list into two, continue dividing mini lists until there is 1 item in each list.

Merge each list and order them until there is only one fully merged list remaining.

Merge sort is faster than bubble sort.