Using the below code as an example:
public void method bigO(int N, int M){
PriorityQueue<Integer>> minHeap = new PriorityQueue<Integer>();
for (int i = 0; i < M; i++) {
minHeap.add(i);
}
for (int i = 0; i < N; i++) {
minHeap.add(i);
}
}
The first loop would have time complexity of O(M log(L)) where L is the size/length of the heap. Similarly, the second loop would have complexity O(N log(L)). Since both M and N are linear terms, how would you determine the overall complexity? Would the overall complexity be something like Max(M log(L), N log(L))?