logo

Crowdly

FUNDAMENTOS DE COMPUTACION

Looking for FUNDAMENTOS DE COMPUTACION test answers and solutions? Browse our comprehensive collection of verified answers for FUNDAMENTOS DE COMPUTACION at online.upr.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Finding the remainder: -44 mod 9

View this question

Given a positive integer mmm and two integers aaa and bbb, a≢baba \not\equiv b (mod mmm) if and only if aaa mod mbmbm \not=b mod mmm.

View this question

Finding the quotient: -84 div 6

View this question

Prove that f(n)=5n2+6n+7f( n ) = 5n^2+6n+7 is O(n2)O( n^2 )

Matching each statement with the correct sequence in a formal proof.

View this question

Given the following algorithm, matching each statement to the correct sequence for complexity analysis.

procedure TailSums(A): A is a list of n integers

1    for i = 0 to n-2 do

2        j = i + 1

3        while (j < n) do

4            A[i] = A[i] + A[j]

5            j = j + 1

6        end while

7    end for

8    return A

View this question

Given the following algorithm, matching each statement to the correct sequence for complexity analysis.

procedure Alg3(A): A is a list of n integers

1    for i = 1 to n-1 do

2        x=aix=aix = a_i

3        j = i − 1

4        while (j \geq 0) do

5            if xajxajx \geq a_j then

6                break

7            end if

8            aj+1=ajaj+1=aja_{j+1} = a_j

9            j = j − 1

a        end while

b        aj+1=xa_{j+1} = x

c    end for

d    return A

View this question

What is the Big-O notation that can best describe the following algorithm?

procedure bubble_sort(A)

1    for i = 0 to n-2 do

2        for j = 0 to n-i-2 do

3            if aj>aj+1a_j > a_{j+1} then

4                swap aja_j and aj+1a_{j+1}

5        end of for j

6    end of for i

7    return A

0%
0%
0%
0%
View this question

What is the Big-O notation that can best describe the following algorithm?

procedure Alg2(x, A): A is a list of n integers

1    i = 0

2    while (i < n)

3        if (x == A[i])

4            break

5        end of if

6        i = i + 1

7    end of while

8    if (i < n)

9        location = i

a    else

b        location = -1

c    end of if

d    return location

0%
0%
0%
0%
View this question

What is the Big-O notation that can best describe the following algorithm?

procedure Alg1(A): A is a list of n integers

1    m = A[0]

2    for i = 1 to n-1

3        if m < A[i] then 

4            m = A[i]

5        end of if

6    end of for

7    return m

100%
0%
0%
0%
View this question

Prove that f(n)=3n2+6n+9f(n)=3n2+6n+9f( n ) = 3n^2+6n+9 is not O(n)O(n)O( n )

Matching each statement with the correct sequence in a formal proof.

View this question

Want instant access to all verified answers on online.upr.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!