Merge k sorted arrays

i know the approach how to solve it but i dont know how to write code or that?

don’t worry
just try it

hint: make a priority queue and store the minimum element(first element) of each sorted array
after that when u remove, it will give u a min element then simply add next element that array. so in PQ you have to strore the value as well as array number.

vahi toh samajh nhi aa rha ki minimum element aa gya uske baad next value ka pta kaise chlega