16Finding the minimum in a min-heap takes:AO(1)BO(n)CO(n log n)DO(log n)View AnswerDiscussWorkspaceReportSaveEasy
17Inserting into a binary heap takes:AO(n log n)BO(n)CO(1)DO(log n)View AnswerDiscussWorkspaceReportSaveEasy
18What is the output of the following code?import heapq print(heapq.nlargest(2, [4, 9, 1, 7]))A[9, 4]B[1, 4]C[7, 9]D[9, 7]View AnswerDiscussWorkspaceReportSaveEasy
19Which algorithm uses a min-priority queue to pick the next closest vertex?ABubble sortBKruskal's algorithm onlyCDepth-first searchDDijkstra's algorithmView AnswerDiscussWorkspaceReportSaveEasy