1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Understand and explain the term algorithm.
An algorithm is a sequence of steps that can be followed to complete a task.
Understand and explain the term decomposition.
Decomposition means breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task, which might itself be further subdivided.
Understand and explain the term abstraction.
Abstraction is the process of removing unnecessary detail from a problem.
Understand and explain how the linear search algorithm works.
A linear search checks each item of the list in turn to see if it’s the correct one. It stops when it either finds the item it’s looking for, or has checked every item. It can be on an unordered list.
Understand and explain how the binary search algorithm works.
A binary search algorithm works by dividing a sorted list in half repeatedly to locate a target value. It begins by checking the middle element, and if the target is less than the middle element, it searches the left half; if greater, it searches the right half, continuing until the target is found or the search space is exhausted. It has to be on an ordered list.
Compare and contrast linear and binary search algorithms.
A linear search is much simpler than a binary search but not as efficient. For large ordered lists the run time of binary search will generally be much quicker than linear search.
Understand and explain how the merge sort algorithm works.
The merge sort algorithm is a divide and conquer algorithm and splits the list aprt then merges back together. Split the list in half, keep repeating until there is only one item in all lists, merge pairs and sort into correct order, repeat until all has merged.
Understand and explain how the bubble sort algorithm works.
The bubble sort algorithm is used to sort an unordered list of items. It repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. This process is repeated until the list is sorted.
Compare and contrast merge sort and bubble sort algorithms.
Merge sort is more efficient for larger datasets as it uses a divide and conquer strategy however it uses more memory, while bubble sort is simpler but slower, requiring multiple passes through the list and potentially multiple swaps.
What is syntax error?
An error in the code where the rules or grammar of the programming language have been broken.
What is a logic error?
When a program does something that was not intended.
Understand the concept of subroutines.
A subroutine is a named ‘out of line’ block of code that may be executed (called) by simply writing its name in a program statement.