Computer Science (Sorting)

Sigchi4life
Category:
Computer Science
Price: $50 USD

Question description

For each problems segment given below, do the following and write your answers in assign5.txt:

  1. Create an algorithm to solve the problem (describe it in English as part of your answer).

  2. Identify the factors that would influence the running time, and which can be known before the algorithm or code is executed. Assign names (such as n) to each factor.

  3. Identify the operations that must be counted.

  4. Count the operations performed by the algorithm or code. Express the count as a function of the factors you identified in Step 2. If the count cannot be expressed as a simple function of those factors, define the bounds that can be placed on the count: the best case (lower bound) and worst case (upper bound).

  5. Determine what the Best Case Inputs are, and the Worst Case Inputs are.

  6. Transform your count formula into big-O notation by:

    • Taking the efficiency with worst case input,

    • Dropping insignificant terms.

    • Dropping constant coefficients.

a. Determine if 2 arrays contain the same elements in the same order
b. Counting total number of characters that have a duplicate within a string (i.e. "gigi the gato" would result in 3, since g, i, and t are repeated.)
c. Finding an empty row in a 2-D array where empty is defined as a row with all entries equal to 0.


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Carnegie Mellon University
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1831 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors