1/29
Looks like no tags are added yet.
What is an intractable problem
When the time complexity of the program that solves the problem grows so fast that it becomes impractical for large inputs
Complexity of 4n³+3nlog2n+273
n³
Bubble sort time complexity?
O(n²)
Time complexity of a binary search?
O(log n)
Time complexity of merge sort?
O(n log n)
Lowest time complexity?
Constant
Longest (worst) time complexity
Factorial
Big O notation measures?
How well it scales (steps) given larger data sets to act upon
To turn a step formula into big O notation?
Remove any constants that n is multiplied by
Constant complexity?
O(1)
Logarithmic complexity?
O(log n)
Linear complexity?
O(n)
Polynomial complexity
O(n²) or O(n³)
Exponential complexity?
O(2^n)
Factorial complexity?
O(n!)
Decomposition
Breaking down a problem into smaller problems
Abstraction
Ignore unnecessary details
Divide and conquer?
Break down a problem, solve smaller problems, combine solutions to solve full problem
Problem recognition is the process of?
Identifying the nature and parameters of the problem
Visualisation in computer science?
Presenting data in an easy to grasp form with physical / mental images
Pipelining?
Processor begins to execute the next instruction before the current instruction has been completed
Data mining
The process of looking for general trends in large sets of data.
List vs Array
Array must have predefined length that cannot be exceeded, list does not
Data in a list is stored in a ____ fasion
Linear
Stacks are
LIFO or FILO
In a stack what is used to keep track of the top of the stack
A pointer variable
Adding to a stack is called
Pushing (push)
What happens when data in a stack is popped?
Data isnt removed from memory, pointer decreases, data overwritten when pushing
Checking the top value of a stack is called
Peeking (peek)
Encapsulation is
Having private values only readable through methods in classes