Font size
WorksheetsOCR H446 - 2.3 Algorithms - Algorithms and Programming 02
Total questions: 85
Worksheet time: 46mins
Which of the following graphs shows Constant Big-O notation?
Which of the following graphs shows Linear Big-O notation?
Which of the following graphs shows Polynomial Big-O notation?
Which of the following graphs shows Exponential Big-O notation?
Which of the following graphs shows Logarithmic Big-O notation?
Which of the following best describes a Constant Big-O notation?
This means that the Size of the data set does not impact the Time complexity remains the same.
This means that Size of the data set increases so does the Time Complexity at the same rate.
This means that as the Size of the data set increases the algorithm takes much more time to run.
This means as algorithm takes increasingly more Time to run as the data set increases.
This means the data set takes a decreasing amount of Time more to complete as the data set increases,
Which of the following best describes a Linear Big-O notation?
This means that the Size of the data set does not impact the Time complexity remains the same.
This means that Size of the data set increases so does the Time Complexity at the same rate.
This means that as the Size of the data set increases the algorithm takes much more time to run.
This means as algorithm takes increasingly more Time to run as the data set increases.
This means the data set takes a decreasing amount of Time more to complete as the data set increases,
Which of the following best describes a Polynomial Big-O notation?
This means that the Size of the data set does not impact the Time complexity remains the same.
This means that Size of the data set increases so does the Time Complexity at the same rate.
This means that as the Size of the data set increases the algorithm takes much more time to run.
This means as algorithm takes increasingly more Time to run as the data set increases.
This means the data set takes a decreasing amount of Time more to complete as the data set increases,
Which of the following best describes a Exponential Big-O notation?
This means that the Size of the data set does not impact the Time complexity remains the same.
This means that Size of the data set increases so does the Time Complexity at the same rate.
This means that as the Size of the data set increases the algorithm takes much more time to run.
This means as algorithm takes increasingly more Time to run as the data set increases.
This means the data set takes a decreasing amount of Time more to complete as the data set increases,
Which of the following best describes a Logarithmic Big-O notation?
This means that the Size of the data set does not impact the Time complexity remains the same.
This means that Size of the data set increases so does the Time Complexity at the same rate.
This means that as the Size of the data set increases the algorithm takes much more time to run.
This means as algorithm takes increasingly more Time to run as the data set increases.
This means the data set takes a decreasing amount of Time more to complete as the data set increases,
Which Big-O notation is show with the equation below:
O(1)
Constant
Linear
Polynomial
Exponential
Logarithmic
Which Big-O notation is show with the equation below:
O(n)
Constant
Linear
Polynomial
Exponential
Logarithmic
Which Big-O notation is show with the equation below:
O(n^2)
Constant
Linear
Polynomial
Exponential
Logarithmic
Which Big-O notation is show with the equation below:
O(2^n)
Constant
Linear
Polynomial
Exponential
Logarithmic
Which Big-O notation is show with the equation below:
O(log(n))
Constant
Linear
Polynomial
Exponential
Logarithmic
Which complexity is described below:
How long an algorithm will take to run for a given data set of size n.
Time Complexity
Space Complexity
Which complexity is described below:
How much memory is required to run an algorithm for a given data set of size n
Time Complexity
Space Complexity
Which searching algorithms is described below:
It only works if records in the file are in order. It involves accessing the middle record in the file and determining if the target record has been found or, if not. Then logically removing data based on higher or lower values.
Linear Search
Binary Search
Which searching algorithms is described below:
Works even if the data is not in order. It involves accessing each piece of data one after each other deciding if it has been found or not.
Linear Search
Binary Search
Which searching algorithm is shown in the image?
Linear Search
Binary Search
Which searching algorithm is shown in the image?
Linear Search
Binary Search
Which algorithm is outlined below:
1)Look at the first item in the unordered list.
2)If this is the item you are looking for, then stop the search, it has been found.
3)If not, then look at the next item in the list.
4)Repeat steps 2) – 3) until you find the item you are looking for or you’ve checked every item.
Linear Search
Binary Search
Which algorithm is outlined below:
1)Find the middle item in the ordered list ((n+1) ÷ 2).
2)If this is the item you’re looking for, then stop the search, you’ve found it.
3) If not compare the item you are looking for to the middle item. If it comes before the middle item, get rid of the second half of the list. If it comes after the middle item, get rid of the first half of the list.
4) You will be left with a list smaller than the original. Repeat steps 1) – 3) on the smaller list until you find the item you are looking for.
Linear Search
Binary Search
Which algorithm is shown in the code in the image?
Linear Search
Binary Search
Which algorithm is shown in the code in the image?
Linear Search
Binary Search
Which of the following best describe Linear Search:
Very simple algorithm to code.
Best suited to small lists.
Not very efficient as it has to search every item individually
Can only be used on ordered lists.
This is more suitable to larger lists.
Which of the following best describe Binary Search:
Very simple algorithm to code.
Best suited to small lists.
Efficient, in general takes less steps
Can only be used on ordered lists.
This is more suitable to larger lists.
Which algorithm is outlined below:
A simple algorithm popular with inexperienced programmers. It is inefficient when sorting large amounts of data as the time taken is related to the square of the number of items. Takes each item in pairs and compares them.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is outlined below:
A simple sorting algorithm that builds the final sorted array (or list) one item at time. It is much less efficient on large lists than more advanced algorithms.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is outlined below:
A type of divide and conquer algorithm which sorts the given sequence in place meaning that it doesn’t require extra storage as would be needed in a merge sort. The basic idea is dividing the sequence into two sub-lists around an element which is called the pivot.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is outlined below:
A type of divide and conquer algorithm that was incited by John von Neumann. First the list is divided into the smallest unit (1 element), then each element is compared with the adjacent list to sort and merge the two adjacent lists.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which sorting algorithm is shown in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which sorting algorithm is shown in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which sorting algorithm is shown in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which sorting algorithm is shown in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is shown in the code in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is shown in the code in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is shown in the code in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is shown in the code in the image?
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is described below:
1) Look at the first two items in the list.
2) If they are in the right order, leave them as they are.If they are in the wrong order, swap them round.
3) Move on to the next pair of numbers and repeat step 2).
4) Repeat step 3) until you get to the end of the list. Each time you go through all of the cards is called a pass.
5) Repeat steps 1) – 4) until you get a full pass without any swaps.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is described below:
1) Look at the second item in a list.
2) Compare it to all the items before it and insert it into the right place.
3) Repeat step 2) for all items that are sorted. When all the items have been compared the list is sorted.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is described below:
1) Split the list in half.
2) Repeat step 1) on all sub-lists contain only one item.
3) Merge pairs of sub-lists, Each time pairs merge sort them into the correct order.
4) Repeat step 3) until all sub-lists have been merged together.
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which algorithm is described below:
1) Set a pointer to the first and last item in the list.
2) While the first pointer is not equal to the second pointer (list of 1) then
2a) If the items at the pointers are in the wrong order, swap the items and the pointers.
2b) Move the first pointer one item towards the second pointer.
3) Repeat from step 1 on the list of items to the left of the pointer.
4) Repeat from step 1 on the list of items from the pointer
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Which of the following are the advantages of an Bubble sort?
A simple algorithm, that can easily be used.
Can efficiently check if a list is already in order.
Does not use much computer memory.
Consistent runtime regardless of how unorganised the list is.
Intuitive way to sort data whilst being easily coded.
Which of the following are the advantages of an Insertion sort?
Copes very well with small lists. Often paired with merge sorts to highlight each's advantages.
Requires very little memory to run.
Very quick to add new items into an already sorted list.
Consistent runtime regardless of how unorganised the list is.
Intuitive way to sort data whilst being easily coded.
Which of the following are the advantages of an Merge sort?
Much more efficient than Bubble and insertion sorts on large lists.
Requires very little memory to run.
Very quick to add new items into an already sorted list.
Consistent runtime regardless of how unorganised the list is.
Intuitive way to sort data whilst being easily coded.
Which of the following are the advantages of a Quick sort?
Useful for sorting arrays fast
Does not take up a lot of storage space.
Very quick to add new items into an already sorted list.
Consistent runtime regardless of how unorganised the list is.
Intuitive way to sort data whilst being easily coded.
What path finding algorithm is shown in the image?
Dijkstra's Algorithm
A* Algorithm
Which of the Path Finding algorithm is being described below?
Finds the shortest path in a graph by checking each node one at a time following the shortest path.
Dijkstra's Algorithm
A* Algorithm
Which of the Path Finding algorithm is being described below?
Finds the shortest path in a graph by using heuristics to estimate the shortest path to follow.
Dijkstra's Algorithm
A* Algorithm
Which Path Finding Algorithm is described by the algorithm below:
Mark the start node as a distance of 0 from itself and all other nodes as an infinite distance from the start node.
While the destination node is unvisited
Go to the closest unvisited node to A (initially this will be A itself) and call this the current node.
For every unvisited node connected to current node:
Calculate distance to current plus the distance of the edge unvisited.
If this distance is less than the currently recorded shortest distance, make it the new shortest distance.
Next connected node
End While
Dijkstra's Algorithm
A* Algorithm
Which Path Finding Algorithm is described by the algorithm below:
Begin at the start node and make this current node.
While the destination node is unvisited
For each open node directly connected to the current node
Add to the list of open nodes.
Add the distance from start to the heuristic estimate of distance left.
Assign this value to the node.
Next connected node
Make the unvisited node with the lowest value the current node.
End While
Dijkstra's Algorithm
A* Algorithm
Which Path Finding algorithm is this code for?
Dijkstra's Algorithm
A* Algorithm
Which Path Finding algorithm is this code for?
Dijkstra's Algorithm
A* Algorithm
What part of the graph is highlighted?
Node
Edge
Weight
Heuristic
What part of the graph is highlighted?
Node
Edge
Weight
Heuristic
What part of the graph is highlighted?
Node
Edge
Weight
Heuristic
What part of the graph is highlighted?
Node
Edge
Weight
Heuristic
Which of the following best describes a "Heuristic"?
A value given to an edge on a graph.
A point on a graph with an ID, that is connected to others by edges.
A line that connects nodes.
A value that is an estimated distance remaining from the destination node.
Which Data Structure is described below:
A list of values that is ordered and unchangeable.
Tuple
List
Array
Stack
Queue
Which Data Structure is described below:
A list of values that can be ordered and can change.
Tuple
List
Array
Stack
Queue
Which Data Structure is described below:
A list of values that are arrange as either 1D, 2D or 3D.
Tuple
List
Array
Stack
Queue
Which Data Structure is described below:
Values stored in a LIFO order.
Tuple
List
Array
Stack
Queue
Which Data Structure is described below:
Values stored in a FIFO order.
Tuple
List
Array
Stack
Queue
Which of the following are functions specific to a Stack?
pop()
push()
peek()
dequeue()
enqueue()
Which of the following are functions specific to a Queue?
pop()
push()
peek()
dequeue()
enqueue()
Which data structure is in the image?
Stack
Queue
Linked List
Which data structure is in the image?
Stack
Queue
Linked List
Which data structure is in the image?
Stack
Queue
Linked List
The beginning of a Linked List is called ?
Head
Null
Pointer
Node
The end of a Linked List is called ?
Head
Null
Pointer
Node
The location of the next node in a Linked List is called ?
Head
Null
Pointer
Node
Each part of a linked list is called?
Head
Null
Pointer
Node
The type of graph shown in the image is?
Undirected
Directed
The type of graph shown in the image is?
Undirected
Directed
Which part of a Tree is described below:
The start node for the tree.
Root
Branch
Leaf
Height
Which part of a Tree is described below:
The path from the root to the end point.
Root
Branch
Leaf
Height
Which part of a Tree is described below:
The end point of a Tree.
Root
Branch
Leaf
Height
Which part of a Tree is described below:
The Value of all the branches from the Root node to the Leaf furthest away.
Root
Branch
Leaf
Height
On the Binary tree in the image what is highlighted?
Root
Parent
Left Child
Right Child
On the Binary tree in the image what is highlighted?
Root
Parent
Left Child
Right Child
On the Binary tree in the image what is highlighted?
Root
Parent
Left Child
Right Child
On the Binary tree in the image what is highlighted?
Root
Parent
Left Child
Right Child
Which Tree Traversal method is shown in the image?
Post-Order (Depth First)
Breadth First
Which Tree Traversal method is shown in the image?
Post-Order (Depth First)
Breadth First
