Merge k sorted arrays

please debug my code

@naazsayma123 you can’t take 2d vector input like this.
try this way to take input

for(int i=0;i<k;i++)
{
    vector<int> v1;
	for(int j=0;j<n;j++)
	{
        int ele;
	 cin>>ele;
         v1.push_back(ele);
	}
    arr.push_back(v1);
}

and take k and n input properly.


@sdevwrat now it still not working

@naazsayma123 you forgot to take input before pushing it to v.

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.