A rather swift completion of the assignment.

Atlest the first cut of it.
Functionally accurate as of now.
Not a very memory efficient implementation.
But I guess that is okay.
Let us try some variants of the implementation now.