Question: can you please answer D, B and C Please the code part i already did it thanks D. -2 points Suppose you want to find

can you please answer D, B and C Please the code part i already did it thanks

can you please answer D, B and C Please the code part

D. -2 points Suppose you want to find the largest entry in an unsorted array of n entries. Algorithm A searches the entire array sequentially and records the largest entry seen so far. Algorithm The array is initially B sorts the array into descending order and then reports the first entry as the largest. Compare the time efficiency of the two approaches. 1 2 3 4 5 E. -10 pointsConsider ann by n array of integer values. Write an 2 3 1 4 5 algorithm to sort the rows of the array by their first value Implement your algorithm The code for this problem is provided in the Assignment-03-Code.zip archive The array after sorting is 2 3 1 4 5 Your output must be identical to the output to the right. 5 2 3 4 1 PART 2 -Queues, Deques, and Priority Queues, 19 points A. -3 pointsAfter the following statements execute, what are the contents of the queue? Queuelnterface myQueue new LinkedQueue) myQueue.enqueue("Jane"); myQueue.enqueue(Jess") myQueue.enqueue("jill"); myQueue.enqueue(myQueue.dequeue()) myQueue.enqueue(myQueue.getFront() myQueue.enqueue("Jim"); String name myQueue.dequeue() myQueue.enqueue(myQueue.getFront() Updated: 3/7/2018 12:10 PM CSC 220.02 ASSIGNMENT 03 SPRING 2018TA B. -3 points After the following statements execute, C. -3 pointsAfter the following statements execute what are the contents of the queue? what are the contents of the priority queue? Assume that the alphabetically earliest string has the highest priority Dequelnterface myDeque new LinkedDeque( myDeque.addToFront("Jim"); myDeque.addToFront("Jess"); myDeque.addToBack("Jill"); myDeque.addToBack Jane"); String name myDeque.removeFront(); myDeque.addToBack(name); myDeque.addToBack(myDeque.getFront()) myDeque.addToFront(myDeque.removeBack()); myDeque.addToFront(myDeque.getBack()); PriorityQueuelnterface myPriorityQueue - new LinkedPriorityQueue>); myPriorityQueue.add("Jim"); myPriorityQueue.add( Jess"); myPriorityQueue.add(Jill"); myPriorityQueue.add("Jane"); String name myPriorityQueue.remove( myPriorityQueue.add(name) myPriorityQueue.add(myPriorityQueue.peek()) myPriorityQueue.add("Jim"); myPriorityQueue.remove() D. -10 pointsUse a circular doubly linked chain to implement the ADT deque In a doubly linked chain, the first and last nodes each Create a deque

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!