https://ide.codingblocks.com/s/331949 can you please check what is wrong with my code and please explain if there exists another approach
Doubt in logic of the code
Modified code
i did not understand the logic behind append function can you please explain