use of assert

what is the benefit of using assert in coding contest? When I read code given in editorial, most of the time I find use of assert. Is there any specific reason behind using it or it is just good coding habit?

@anup1ma:Refer this link(read the comment posted by crucifix):

Link :http://discuss.codechef.com/questions/31412/advantage-of-using-assert-in-program

Also refer this link: http://www.pgbovine.net/programming-with-asserts.htm

1 Like