Merge K Sorted Array

pq.push({arr[i][0],{i,0}});

How this line work ?? I didn’t get it

Mention the timestamp in the video.
Also…what is your doubt?
pq.push({arr[i][0],{i,0}}); is most probably making a pair (of an integer and another pair) and then pushing in the priority queue. This is one way to make pair without using make_pair function


Getting error

Check now.

vector<vector> arr(r,vector©);//Changed
it means a vector of vector[row][col] ??

Yes…this is the way to make a 2d vector with given number of rows and columns

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.