Adding a gist to give brief detail of the solution