Now, I won’t be showing much of the source code here, because you can already look up the source code, what I’ll do is, I’ll explain the logic it follows in plain simple english language so you can have an abstract idea about how the things are working under the hood rather than bothering yourself with the source code.