Current streak:
14 days
Longest streak:
29 days
Less
More
College monthly badge
1 Time topper
Shri Guru Gobind Singhji Institute of Engineering and Technology, Nanded
import java.util.* ;
import java.io.*;
public class Solution {
public static ArrayList<Integer> findMinMax(int a, int b) {
// Write your code here
PriorityQueue<Integer> pq= new PriorityQueue<>();
ArrayList<Integer> ans = new ArrayList<>();
pq.add(a);
pq.add(b);
ans.add(pq.poll());
ans.add(pq.poll());
return ans;
}
}
import java.util.* ;
import java.io.*;
public class Solution {
public static ArrayList<Integer> findMinMax(int a, int b) {
// Write your code here
PriorityQueue<Integer> pq= new PriorityQueue<>();
ArrayList<Integer> ans = new ArrayList<>();
pq.add(a);
pq.add(b);
ans.add(pq.poll());
ans.add(pq.poll());
return ans;
}
}