Skip to content

Quiz Lookup

  • Home
  • Blog

Blog

What is the time complexity of this insert method in a Heap…

What is the time complexity of this insert method in a Heap Priority Queue? public void insert(E key) { heap.add(key); // Step 1 upheap(heap.size() – 1); // Step 2 }

Published April 14, 2026
Categorized as Uncategorized

What is the auxiliary bspace/b complexity of the standard Me…

What is the auxiliary bspace/b complexity of the standard Merge-Sort algorithm, and why?

Published April 14, 2026
Categorized as Uncategorized

Why is sorting data a critical prerequisite for algorithms l…

Why is sorting data a critical prerequisite for algorithms like Binary Search?

Published April 14, 2026
Categorized as Uncategorized

What is the worst-case time complexity for a search operatio…

What is the worst-case time complexity for a search operation in a Hash Table (assuming all keys collide)?

Published April 14, 2026
Categorized as Uncategorized

Which of the following best defines the Heap-Order Property…

Which of the following best defines the Heap-Order Property for a Min-Heap?

Published April 14, 2026
Categorized as Uncategorized

Consider the following snippet from an UnsortedListPQ implem…

Consider the following snippet from an UnsortedListPQ implementation. What is its time complexity? int minIndex = 0; for (int i=1; i < data.size(); i++) { if (data.get(i).compareTo(data.get(minIndex)) < 0) { minIndex = i; } } return data.remove(minIndex);

Published April 14, 2026
Categorized as Uncategorized

According to the lecture slides, what is the time complexity…

According to the lecture slides, what is the time complexity of removeMin for the Sorted List implementation (assuming efficient removal from the front)?

Published April 14, 2026
Categorized as Uncategorized

The “Combine” phase (or “merge” step) of Merge-Sort, which c…

The “Combine” phase (or “merge” step) of Merge-Sort, which combines two already sorted lists (S1 and S2) into one final sorted list (S), runs in ______ time. (Use Big-O notation, e.g., O(n)).

Published April 14, 2026
Categorized as Uncategorized

What does the following upheap condition check for? while (…

What does the following upheap condition check for? while (j > 0) { int parent = (j – 1) / 2; if (heap.get(j).compareTo(heap.get(parent)) >= 0) break; // swap logic… }

Published April 14, 2026
Categorized as Uncategorized

Which of the following sorting algorithms have an average-ca…

Which of the following sorting algorithms have an average-case time complexity of O(n log n)? (Select all that apply)

Published April 14, 2026
Categorized as Uncategorized

Posts pagination

Newer posts Page 1 … Page 2,222 … Page 85,241 Older posts
Powered by Studyeffect
  • Privacy Policy
  • Terms of Service
Quiz Lookup
Proudly powered by WordPress.