sol: https://ide.codingblocks.com/s/426911
prob: https://hack.codingblocks.com/app/contests/2022/1603/problem
getting seg fault
sol: https://ide.codingblocks.com/s/426911
prob: https://hack.codingblocks.com/app/contests/2022/1603/problem
getting seg fault
Hello @raghav007 while adding the top from the queue make the check if they are not at NULL.
like this: for(int i = 0; i < heads.size(); i++){
// if(heads[i])
// pq.push(heads[i]);
// }
not getting seg fault this time, but there is no output
it is giving the wrong answer please tell the msitake