Could not understand the reason behind failing two testcases for the code present at https://ide.codingblocks.com/s/155772.