Computer Science, asked by Achievements1337, 16 days ago

Question 14.Which data structure is considered best to find maximum value from a huge collection of data?Answer:MarksO Sorted arrayOMax heapO Min heapGG0 Binary search treeSkip & ProceedPrevious​

Answers

Answered by mohit7677
0

Explanation:

If the list of elements is sorted than apply binary search, it takes O(logn) time.

if it is unsorted than apply max heap, it takes On(logn) time.

Answered by shilpa85475
0

Sorted elements: binary search tree

unsorted elements: max heap

Explanation:

A binary search tree, additionally referred to as an ordered binary tree is a binary tree in which the nodes are organized in order.

The order is : a) All the values withinside the left sub-tree has a price much less than that of the foundation node.

b) All the values withinside the proper node has a price extra than the price of the foundation node.

A max-heap is an entire binary tree wherein the price in every inner node is extra than or the same as the values withinside the kids of that node. Heaps are used in lots of well-known algorithms which includes Dijkstra's set of rules for locating the shortest path, the heap kind sorting a set of rules, imposing precedence queues, and more.

Essentially, lots are the shape of the records you need to apply while you need which will get entry to the most or minimal detail very quickly.

Similar questions