Algorithms Flashcards
What is the definition of abstraction?
removing unimportant parts of a problem in order to concentrate on those that are important
What is the definition of decomposition?
breaking down a problem into smaller more manageable ones
What is the definition of algorithmic thinking?
an approach to solving problems by the use of algorithms (sequences of steps that lead to a solution)
What is a structure diagram?
a hierarchical diagram that shows how a problem is broken down into sub-sections/sub-tasks
What is a linear search?
going through each item in the list, one by one
What is a binary search?
a way of looking for a piece of data in an ordered list by continually splitting the list in half
How does a bubble sort work?
Given a list of values, the computer compares adjacent pairs of elements and swaps them if they are not in the right order. It will make several passes of the list until the data is in sorted order.
How does an insertion sort work?
Given a list of values, the computer takes one item at a time and places it in the correct position in the list.
How does a merge sort work?
The list is repeatedly divided into two until all the elements are separated individually. Pairs of elements are then compared, placed into order and combined.
Data Type - REAL
A number with a decimal point
Data Type - BOOLEAN
True or false
Data Type - STRING
A sequence of one or more characters