Https://ide.codingblocks.com/s/224633

not geting the expected output.

I am storing the range also with the node i.e which indexes are passing through the given node , checking whether to take that node or not.

@Adarshrajpandey hey u have some minor issue
refer to this code here