Help with making this algorithm better

Printable View