Question Details

(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.

Snip20170509_180.png



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

c) radix 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

d) Linked List


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?

Snip20170509_181.png


a) None of these answers

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
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Sep 05, 2019

PRICE: $18

Solution~000200200208.zip (25.37 KB)

Buy this answer for only: $18

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 .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 05, 2019

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.

Order Now