Questions: 856

Answers by our Experts: 763

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

3. Create a class to implement a queue using a circular array[20 marks]

a. The class should contain functions to
i. Insert a new value, [5 marks]
ii. Delete a value. [5 marks]
iii. Change a value equal to X to a value equal to Y. [5 marks]
iv. Count all value equal to X in the queue. [5 marks]
b. For each function above perform an asymptotic analysis and state the worst case performance of the algorithm
Write an algorithm to read a name and age of student display the inputted values
Celsius (centigrade) temperature C can be converted to an equivalent fahrenheit temperature F according to the following formula: F = (9/5)C + 32

Write the algorithm that will read in a Celsius temperature and then output the equivalent fahrenheit temperature
Write the algorithm that will display " IT'S COLD!" if the temperature is less than 20 " IT'S HOT!" if the temperature greater than 30, "COOL!" otherwise
Celsius (centigrade) temperature C can be converted to an equivalent fahrenheit temperature F according to the following formula: F = (9/5)C + 32

1.    Create a class to implement a queue using a circular array[20 marks]<o:p></o:p>

 a.     The class should contain functions to

                                    i.         Insert a new value, [5 marks]

                                  ii.         Delete a value. [5 marks]



a.      Describe the concept of a Binary heap and the heap order property. [10 marks]

b.     Explain the use of the binary heap as an effective implementation for a priority queue [10 MARKS]


a.       Use Prim’s algorithm starting at node A to compute the Minimum Spanning Tree (MST) of the following graph. In particular, write down the edges of the MST in the order in which Prim’s algorithm adds them to the MST. Use the format (node1; node2) to denote an edge.[8 marks]

 


a. Describe the concept of a Binary heap and the heap order property. [10 marks]

b. Explain the use of the binary heap as an effective implementation for a priority queue [10 MARKS]


a. Describe the concept of a Binary heap and the heap order property. [10 marks]

b. Explain the use of the binary heap as an effective implementation for a priority queue [10 MARKS]



LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS