code link
Why showing wrong answer
hello faraz,
there is some logical issue in ur code,
refer this logic->

u can multiset in place of heap
code link
hello faraz,
there is some logical issue in ur code,
refer this logic->

u can multiset in place of heap