Jindal's Algorithm

Inserted code of Jindal himself to crosscheck with my code, everything
works fine, apparently.