Yet another implementation 

This pull request just about another implementation for the same problem :)