Every one wants their code to be perfect. What makes the code perfect? Its “Efficiency” and “Simplicity“. Now we are focusing on the Efficiency of our code. And it is decided by the algorithms used in the code. If you do not know the basic WHY, you will never know HOW .