logo

Crowdly

COMP 6651 NN 2244 (Winter 2025)

Looking for COMP 6651 NN 2244 (Winter 2025) test answers and solutions? Browse our comprehensive collection of verified answers for COMP 6651 NN 2244 (Winter 2025) at moodle.concordia.ca.

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

We want to arrange the n numbers stored in any array such that all negative values occur before all positive ones. 

What is the minimum number of exchanges required in the worst case?

View this question

What are the functions represented in the graph below?

 

Some classical functions

View this question
  Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3, and f4?

f1(n) = 2n

f2(n) = n

(3/2)

f3(n) = n*log(n)

f4(n) = n

log(n)

Choice 1 : f3, f2, f4, f1

Choice 2: f3, f2, f1, f4

Choice 3: f2, f3. f1, f4

Choice 4: f2, f3, f4, f1

 
View this question

Binary tree

 

What is the big O time complexity for finding if a value is in a binary search tree?

  1. O(N)
  2. O(log(N))
  3. O(1)
  4. O(2N)
View this question

What is the solution of the following recurrence

T(n) = T(n/4) + T(n/2) + cn2

T(1) = c

T(0) = 0

where c is a positive constant

1. O(n3)

2. O(n2)

3. O(n2 log n)

4. O(nlog n)
View this question

The answers to the questions of this quiz are my own and I pledge to not use any outside sources or people to help me.  By clicking True I pledge that I will not cheat

View this question

Let G be an undirected graph. Consider a depth-first traversal of G, and let T be the resulting depth-first search tree. Let u be a vertex in G and let v be the first new (unvisited) vertex visited after visiting u in the traversal. Which of the following statements is always true?

0%
0%
0%
View this question
How is the potential method different from the accounting method in amortized analysis?

 

View this question

Your friends are starting a security company that needs to obtain licenses for n different pieces of cryptographic software. Due to regulations, they can only obtain these licenses at the rate of at most one per month.

Each license is currently selling for a price of $100. However, they are all becoming more expensive according to exponential growth curves: in particular, the cost of license j increases by a factor of rj > 1 each month, where rj is a given parameter. This means that if license j  is purchased months from now, it will cost $100 rjt.

We will assume that all the price growth rates are distinct; that is, ri ≠ rj for licenses i ≠ j (even though they start at the same price of  $100).

Given that the company can only buy at most one license a month, in which order should it buy the licenses so that the total amount of money it spends is as small as possible?

Provide the complexity of your algorithm

Which type of proof would you use for proving that your algorithm is optimal? State clearly what you need to prove, considering the type of proof you would use. 

View this question

Prim

 

Run Prim’s algorithm starting on node A.

Fill the table below by indicating the order in which the edges are added to the MST under construction, and the final node labels.

 

View this question

Want instant access to all verified answers on moodle.concordia.ca?

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