11In a max-heap, every parent is:AEqual to its childrenBGreater than or equal to its childrenCLarger than all leaves onlyDSmaller than its childrenView AnswerDiscussWorkspaceReportSaveEasy
12For a heap stored in an array with 0-based indexing, the parent of the node at index 9 is at index:A5B4C8D3View AnswerDiscussWorkspaceReportSaveMedium
13Inserting into a binary heap takes:AO(1)BO(n log n)CO(log n)DO(n)View AnswerDiscussWorkspaceReportSaveEasy
14What is the output of the following code?import heapq h = [] for x in [5, 1, 8, 3, 2]: heapq.heappush(h, x) print([heapq.heappop(h) for _ in range(3)])A[8, 5, 3]B[1, 3, 5]C[1, 2, 3]D[5, 1, 8]View AnswerDiscussWorkspaceReportSaveEasy
15Inserting 5, 3, 8, 1 one by one into an empty min-heap (array form) gives:A[1, 5, 8, 3]B[1, 3, 5, 8]C[5, 3, 8, 1]D[1, 3, 8, 5]View AnswerDiscussWorkspaceReportSaveMedium