Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 431 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 21 Jul 2017 My Price 12.00

characterization

1. Show that if d(n) is O( f (n)) and e(n) is O(g(n)), then the product d(n)e(n) is O( f (n)g(n)).

2. Give a big-Oh characterization, in terms of n, of the running time of the Ex1 function shown in Code Fragment 4.6.

Code Fragment 4.6: Some algorithms.

Algorithm Ex1(A):

Input: An array A storing n ≥ 1 integers.

Output: The sum of the elements in A.

s←A[0]

fori←1to n−1 do

s←s+A[i]

returns

Algorithm Ex2(A):

Input: An array A storing n ≥ 1 integers.

Output: The sum of the elements at even cells in A.

s←A[0]

fori←2to n−1 by increments of 2 do

s←s+A[i]

returns

Algorithm Ex3(A):

Input: An array A storing n ≥ 1 integers.

Output: The sum of the prefix sums in A.

s←0

fori←0to n−1 do

s←s+A[0]

forj←1 to i do

s←s+A[ j]

returns

Algorithm Ex4(A):

Input: An array A storing n ≥ 1 integers.

Output: The sum of the prefix sums in A.

s←A[0]

t←s

fori←1to n−1 do

s←s+A[i]

t←t +s

returnt

Algorithm Ex5(A,B):

Input: Arrays A and B each storing n ≥ 1 integers.

Output: The number of elements in B equal to the sum of prefix sums in A.

c←0

fori←0to n−1 do

s←0

forj←0 to n−1 do

s←s+A[0]

fork←1to j do

s←s+A[k]

ifB[i] = s then

c←c+1

returnc

Answers

(5)
Status NEW Posted 21 Jul 2017 07:07 AM My Price 12.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------

Not Rated(0)