Question: What is the time complexity to insert an element into a heap with N elements? A. O(N) B. O(1) C. O(N2) D. O(logN) QUESTION 9

 What is the time complexity to insert an element into a
heap with N elements? A. O(N) B. O(1) C. O(N2) D. O(logN)
QUESTION 9 In a Huffman tree, the item with the lowest frequency

What is the time complexity to insert an element into a heap with N elements? A. O(N) B. O(1) C. O(N2) D. O(logN) QUESTION 9 In a Huffman tree, the item with the lowest frequency of occurrence will have the code. A. shortest B. all one C. longest D. all zero Set s= new HashSet(); s.add ("hello"); s.add ("bye"); Set t = new HashSet(); t. add ("123") ; t.add ("456") t.add ("bye") ; saddA11(t); A. \{"hello", "bye", "123", "456", "bye"\} B. \{"hello", "bye", "123"\} C. \{"hello", "bye", "123", "456"\} D. \{"hello", "bye"\} QUESTION 11 What is the time complexity to search a key from a HashMap with N elements? AO(N2) B. O(I) C. O(N) D. O(logN) What is the time complexity to search a key from a TreeMap with N elements? AO(N2) B. O(N) C. O(logN) D. O(1) QUESTION 13 What is the time complexity to sort an array with N random numbers using bubble sort? A. O(N) B. O(N2) C. O(1) D. O(NlogN) QUESTION 14 What is the time complexity to sort an array with N random numbers using Merge sort? AO(N2) B. O(N) C.O(1) D. O(NlogN)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!