I have been working all night on this, and I cannot seem to understand it at all. I came here for help after trying my best.
This is a sample algorithm of the end goa