An array consists of n elements. We want to create a heap using the elements. The time complexityof building a heap will be in order of
A. O(n*n*logn)
B. O(n*logn)
C. O(n*n)
D. O(n *logn *logn)
Answer:B
An array consists of n elements. We want to create a heap using the elements. The time complexityof building a heap will be in order of
A. O(n*n*logn) B. O(n*logn) C. O(n*n) D. O(n *logn *logn)