
Here is the algorithm: algorithm

Here is the algorithm: algorithm