Problem
1. Write an algorithm that finds the greatest common divisor of two integers.
2. Write an algorithm that finds both the smallest and largest numbers in a list of n numbers. Try to find a method that does at most 1.5n comparisons of array items.
3. Write an algorithm that determines whether or not an almost complete binary tree is a heap.