1
Algorithms:
Iterative and Recursive
Structures
1. Iterative Structures
The Insertion Sort Algorithm:
Examples
Algorithm in pseudocode
2. Recursive Structures
The Binary Search Algorithm:
Examples
Algorithm in pseudocode
2
1. Iterative Structures
● The Sequential Search Algorithm
● Loop Control
● The Insertion Sort Algorithm
Insertion sort is a simple sorting algorithm that
builds the final sorted array (or list) one element
at a time.
3
1. Iterative Structures
The insertion sort algorithm
Let's work with pseudocode
and solve two excercises!
4
2. Recursive Structures
● The binary search algorithm
Binary search is a search algorithm for
searching sorted data for a particular item.
11 95 - ?
18
27
38
75
86 86 86
95 95 95
102 102
170 170
5
2. Recursive Structures
The binary search algorithm
Let's work with pseudocode
and solve excercise!
6
For practice... Blockly
https://code.google.com/p/blockly/
Blockly is a web-based, graphical programming
editor. Users can drag blocks together to build an
application.
7
„Maze“
Use Blockly to solve a maze

Algorithms