## (Solved) Thank you.

I need help answering the following ten questions by 7pm central time. Thank you.

Â Â 1. Assume you have two algorithms, A and B, both of which perform the sameÂ function, although their implementations differ. Algorithm A has a running time of O(N3+10 N2Â + 2000N) while algorithm B has a running time of O(100N2).Â Also assume that the value of N is restricted to the set of Natural numbers,Â i.e.,{1, 2, 3, ...}. For what values of N algorithm B performs faster than algorithm A?

a) 0<N<40

b) N>50

c) 40<N<50

d) a&b

2.Â write a method which returns the maximum value for the y-coordinate in the tree. For example, in the following 2DTreeÂ the maxminum value for the y-coordinate is 70.Â Please note that your method must avoid traversing all the nodes in the tree.Â

your method must have the following signature:

public intÂ getMaxY()

Paste your code in the answer box for this question. If you use a helper method please include the code for those methods as well. If you are not able to finish the method completely, turn in what you have. I will be giving partial credit for this question. 3. Consider the following directed weighted graph and suppose Dijkstra's algorithm is used to find the shortest path from node A to node K.Â Which one shows the correct order in which nodes are visited (removed from the priority queue) before visiting the destination node?

a) ABCFDGIHJ

b) ABGHK

c) ABCDEGJ

d) ABFIGJ

4. Which sorting algorithm does not use comparison to sort the items?

a) insertion sort

b) selection sort

d) quicksort

5. What isÂ theÂ worst caseÂ running time forÂ removing an itemÂ located exactly in theÂ middleÂ of aÂ doubly linked list that is traversable from either end?Â DoÂ notÂ ignore coefficients.

a) O(N)

b) O(log N)

c) O(1)

d) O(N/2)

6.What isÂ theÂ worst caseÂ running time forÂ removing an arbitrary itemÂ from a doubly linked list?

a) O(N)

b) O(log N)

c) O(1)

d) O(N log N)

7. What isÂ theÂ worst caseÂ running time forÂ removing an itemÂ from an ArrayQueue?

a) O(N)

b) O(log N)

c) O(1)

d) O(N/2)

8. Select the data structures that are traversable.Â (bold all that apply)

a) Stack

b) Binary Tree

c) Queue

9. What isÂ theÂ worst and average caseÂ running time forÂ adding an item to a generic binary search tree; i.e., a binary search tree that does not contain any provisions for maintaining balance?

a) O(N), O(logN)

b) O(log N), O(logN)

c) O(N),O(N)

d) O(N log N), O(N)

10. For the binary tree below, in what order would the nodes be processed using aÂ postorderÂ traversal? b) L H I Z K P E M Y T X A

c) L H Z M Y K I P T E X A

d) M Y Z K H T P X A E I L

e) M Z Y H K L T P I X E A

Solution details:
STATUS
QUALITY
Approved

This question was answered on: Sep 05, 2019 Solution~000200200208.zip (25.37 KB)

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free solution (Deadline assured. Flexible pricing. TurnItIn Report provided) ##### Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .

STATUS

QUALITY

Approved

Sep 05, 2019

EXPERT

Tutor 