here is the code:https://ide.codingblocks.com/s/367011
hello @vketan182 u havent sorted ur array
but it is showing segmentation fault
@vketan182 check now->