0% found this document useful (0 votes)
14 views1 page

2 1-Algorithms 250009778

Computational thinking involves two key concepts - abstraction and decomposition. Abstraction involves focusing on important problem details while decomposition breaks problems into smaller parts. Algorithms provide step-by-step solutions and include techniques like searching and sorting. Common searching algorithms are linear search, which checks each item, and binary search, which finds the middle item of a sorted list. Common sorting algorithms include bubble sort, which repeatedly swaps adjacent items; merge sort, which splits lists and merges sublists; and insertion sort, which inserts items into the correct position.

Uploaded by

Mark Robson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

2 1-Algorithms 250009778

Computational thinking involves two key concepts - abstraction and decomposition. Abstraction involves focusing on important problem details while decomposition breaks problems into smaller parts. Algorithms provide step-by-step solutions and include techniques like searching and sorting. Common searching algorithms are linear search, which checks each item, and binary search, which finds the middle item of a sorted list. Common sorting algorithms include bubble sort, which repeatedly swaps adjacent items; merge sort, which splits lists and merges sublists; and insertion sort, which inserts items into the correct position.

Uploaded by

Mark Robson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

2.

1 ALGORITHMS
COMPUTATIONAL THINKING FLOWCHART PSEUDOCODE
START
Abstraction •Focussing on just the important IF the Decision = TRUE
details of a problem THEN:
Perform Action 1
•Breaking a problem down into smaller ELSE
Decomposition parts so that it is easier to solve
Perform Action 2
ENDIF
Algorithmic •creating a step by step solution to a END
thinking problem

SEARCHING ALGORITHMS SORTING ALGORITHMS


To find an item in a list, computers need to use Sorting algorithms sort items into an ordered list.
a searching algorithm. A linear search and
binary search are both examples of sorting Bubble Sort: Checks the first two items in a list, swaps them if
algorithms. they are in the wrong order and then moves onto the next two
items and repeats the process. Once it has passed through the
Linear Search: Checks each item in the list one list once it goes through again until none of the items need
by one until it finds what it is looking for swapping. + Simple. – Takes a long time
+ Simple, list doesn’t need to be ordered
- Not efficient, takes time with lots of data Merge Sort: Finds the middle item (n+1)/2 and splits the list in
half. Repeats this step until the list is split into individual
Binary Search: Finds the middle item in an items (sub-lists). It them merges (joins) the sublists in pairs.
ordered list by doing (n+1)/2. IF the middle Each time the sublists are paired they are sorted into the
item is what it is searching for it stops. If correct order. + Efficient – Slow
not, it compares the item you are searching for
to the middle item so that it knows whether to Insertion Sort: Looks at the second item in a list and compares
look in the first half or second half of the it to the items that are in front of it, then inserts it into
list. Then it repeats these steps until the item the right place. It then moves to the next item in the list and
is found repeats these steps. + Quick for sorting small lists – slow with
+ More efficient than a linear search long lists
- Only works on an ordered list, complex to
program

You might also like