You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return a new sorted merged list from K sorted lists, each with size N. Before we move on any further, you should take some time to think about the solution!
*/
import java.io.*;
import java.util.*;
public class DPPHard1
{
public static void main(String[] ar)throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int k = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
ArrayList<PriorityQueue<Integer>> a = new ArrayList<>();
for(int j=0;j<k;j++)
{
PriorityQueue<Integer> pq = new PriorityQueue<>();