cs paper 1 Flashcards

1
Q

linear seach

A

-can be sorted/unsorted list
-starts at first item and checks each one
-efficient for smaller data sets
-inefficient for large data sets
-complexity of O(n) linear

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

Binary search

A

-sorted data set
-starts at middle item and repeatedly divides list in half
-efficient for large date sets
-O(log n)

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

bubbles sort

A

-orders an unordered list
-by comparing each item with the one next to it if out of order
-finished when no more swaps can be made
-inefficient, easy to implement
-popular for small data sets
-O(n2) -polynomial

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

Merge Sort

A

-divide and conquer
-2/more identical sub-problems, from larger problem solve individually and combine the solutions
-data is repeadetely spilt until each item is its own list
-adjacent lists are merged back with each items being entered into correct place in new list
-works best with larger data sets where memeory is not a concern
-parallel processing
-O(n log n) linearithmic

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

abstraction

A

-removing unnecessary detail and only showing details that are important in context

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

need for abstraction

A

-method of computational thinking and problem-solving that focusus on whats important
-e.g. when you save a file (where is it stored?) level of detail is abstracted, don’t need to be concerned with how it all happens

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

procedural abstraction

A

-result of abstracting away the actual values used in any particular computation
-e.g. (5 * 7) + 3 = (a * b) + c

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

functional abstraction

A

e.g. (a * b) + c =
all you have to do is supply the number order, type of inputs required to get output

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

data abstraction

A

-isolate how a compound data object is used from details of how it is constructed
-e.g. a stack
-could be coded using an array, linked list, OOP
-if data structure behaves like a stack we dont need to worry about specific implementation

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

problem abstraction

A

-removing details from a problem until its represented in a way possible to solve as it has been reduced to one already solved

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

problem decomposition

A

-process of taking a large problem and breaking it down into several smaller problems
-repeat process until lowest-level boxes represent a single task or action
-aim = end up with small,independent modules that can be written by a small team, so modules can be written/tested in isolation before being integreated back into solution

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

composition

A

In bottom up development solutions are developed by plugging together
pre-existing components already proven to work
-Composition abstraction=Combining appropriate procedures to form compound procedure (All routines will be pre-written ,pretested and compiled as part of library)

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

FSM

A

-model of computation
-Used to design computer programs and sequential logic circuits
-Abstract model power machine reacts to external events
-Changes state based on a trigger Condition or input
-to visualise fsm we draw STD/STT

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

FSM notation

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

State transition table

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