gives segmentation fault
Merge K sorted array heap
your logic is correct
only mistake in code you have done is
at line no 34 after if condition you put semicolon which is wrong
Modified Code
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like
: and donβt forgot to mark doubt as resolved 
1 Like