Nice permutation inversion problem - Learned something

Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarreddy@gmail.com>