Algorithms Flashcards
What is computational thinking
formulating a problem and expressing its solution in a way that a computer can carry out
What is abstraction
Finding key parts of the problem and removing the parts which aren’t important so it is easy to solve
Decomposition
breaking down a complex problem into small manageable parts.
What is a structure diagram
Structure of a program and its subsections
What is a trace table?
Shows how variables change throughout a program
What is a syntax error
an error which doesn’t obey the rules of the programming language
What is a logic error
When the program doesn’t do what the user intended
What are the searching methods
Binary
Linear
How does binary search work
Takes the list, splits it in half and chooses the side which the number isn’t on and deletes it. Continue. ONLY WORKS FOR ORDERED LISTS
How does linear search work.
Searches through every value on the list to find the one it is looking for.
What are the sorts?
Bubble
Merge
Insert
How does bubble sort work?
Tracks through the list. If the number is bigger than the number to the right, it swaps. Continues till the entire list is examined.
How does merge sort work
The list is broken down into subsets with individual values. Then, the list is merged together but in order.