Minimum Jumps Required

My code doesn’t pass test-case 3. Can’t find any solution to it.
Here is my code-link: https://ide.codingblocks.com/s/393672

here is your corrected code:

you have to update jumps as jumps_tk+1 only if it satisfies the conditions .