Still have'nt understood why I am failing last test-case

hello @G_rahil
you havent initialsied d
image
it will contain garbage value.