Sorting and Searching Algorithms (AQA GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
Searching algorithm definition
Searching algorithm definition
Instructions to find specific info in a list of data
Simplest searching algorithm
Simplest searching algorithm
Linear search
Alternative name for linear search
Alternative name for linear search
Sequential search
Linear search starting point
Linear search starting point
Beginning of the list
How linear search checks items
How linear search checks items
One by one in order from start to finish
When linear search finds target
When linear search finds target
Stops immediately
Linear search reaches end, no match
Linear search reaches end, no match
Item is not in the list
Linear search data requirement
Linear search data requirement
None - works on sorted and unsorted lists
Linear search advantage
Linear search advantage
Simple to understand and easy to program
Linear search disadvantage
Linear search disadvantage
Slow and inefficient for large datasets
Linear search worst-case
Linear search worst-case
Item at end or not in list
Linear search time complexity
Linear search time complexity
- may check every item
