Answer:
Answer is in the provided screenshot!
Explanation:
This answer is actually a simplified version of another question I've answered for you here: https://brainly.com/question/15538849
If you need any more explanation on how this algorithm works, please ask me!