1/39
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is abstraction in computational thinking?/Ignoring unnecessary information and focusing only on the important facts
Why is abstraction used in problem solving?/Because it simplifies a problem to make it less complex
What is decomposition in computational thinking?/Breaking a problem into smaller tasks to make it easier to solve
How does decomposition help in team-based problem solving?/It allows different people to work on different parts of a larger problem
What is algorithmic thinking?/Following logical steps to solve a problem
How are decomposition and abstraction related to algorithmic thinking?/They help prepare the problem for solving using logical steps
What is an algorithm?/A set of instructions presented in a logical sequence
Why do programmers create algorithm designs before coding?/To plan the program and consider potential problems before writing code
What do structure diagrams show?/The organisation of a problem in a visual format
What do trace tables do?/Track the value of variables as a program runs
How is each row and column used in a trace table?/Each row is an iteration and each column stores a variable’s changing value
What is a linear search?/A search that checks each data item in order from first to last
Does a linear search require the list to be sorted?/No
Why is a linear search inefficient for large lists?/Because it checks each item one at a time from start to end
What loop is used in a linear search?/A loop that checks each value and increments by 1
What happens if a linear search reaches the end without finding a match?/The value is not included in the list
What is a binary search?/A search that compares the midpoint of a sorted list to the target value
Why is binary search more efficient than linear search?/It checks fewer data items and is faster for large sets
What is a prerequisite for using a binary search?/The list must already be sorted
What values are calculated in a binary search?/Midpoint, lowpoint and highpoint
What loop is used in a binary search?/A while loop that compares the midpoint to the target value
What happens if the midpoint does not match the target in a binary search?/The upper or lower half of the data is ignored
What is merge sort based on?/Divide and conquer
How does a merge sort work?/It divides the list repeatedly until each item is separate, then merges them in order
When does the merge sort algorithm end?/When all sublists are merged into one sorted list
What is a key feature of a merge sort algorithm?/It is recursive and calls itself to split the list into left and right sides
When does the merge sort stop splitting lists?/When each sublist has a length of 1
What does a bubble sort do?/It compares adjacent data elements and swaps them if they are in the wrong order
When does a bubble sort stop?/When a full pass is made without any swaps
Is a bubble sort suitable for large data sets?/No
What loop controls the outer part of a bubble sort?/A while loop that checks if swaps were made
What loop controls the inner part of a bubble sort?/A for loop that iterates through the data set
What does the flag do in a bubble sort?/It tracks whether a swap has occurred
What is the purpose of a temporary variable in bubble sort?/To help correctly swap elements
How does an insertion sort begin?/By logically splitting the list into sorted and unsorted parts
How does an insertion sort place values?/By inserting unsorted values into the correct position in the sorted part
Is insertion sort more efficient for small or large data sets?/Small
What loop controls the outer part of an insertion sort?/A for loop that moves through each item
What loop controls the inner part of an insertion sort?/A while loop that moves backward to find the correct position
How does an insertion sort find the correct position?/By decreasing the index in the while loop to move backwards through the sorted part