1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natali5045456 [20]
4 years ago
5

Give a big-O estimate for the number of operations,

Computers and Technology
1 answer:
Kazeer [188]4 years ago
6 0

Answer:

Explanation:

For the first iteration of i for loop 1 to n, the j for loop will run from 2 to n times. i.e. n-1 times.

For the second iteration of i for loop, the j for loop will run from 3 to n times. i.e. n-2 times.

From the third to the last iteration of i for loop, the j for loop will run n-1 to n times. i.e. 2 times.

From the second to the last iteration of i for loop, the j for loop will run from n to n times. i.e. 1 time.

For the last iteration of i for loop, the j for loop will run 0 times because i+1 >n.

Hence the equation looks like below:

1 + 2 + 3 + ...... + (n-2) + (n-1) = n(n-1)/2

So the number of total iterations is n(n-1)/2.

There are two operations per loop, i.e. Comparison and Multiplication, so the iteration is 2 * n(n-1)/2 = n ^2 - n

So f(n) = n ^ 2 - n

f(n) <= n ^ 2 for n > 1

Hence, The algorithm is O(n^2) with C = 1 and k = 1.

You might be interested in
Imagine you have borrowed your friend's computer to work on a class project. Checking
castortr0y [4]

Answer:

Yes.It would be considered as a computer Crime.

Explanation:

This is because you are an unauthorised user

6 0
3 years ago
Which of these is NOT a standard part of the outro of a podcast?
Lisa [10]

Answer:

final thoughts

Explanation:

it is generally what we should do so that people can know what your opinion on it at the end

7 0
3 years ago
Pda bkhhksejc pnwjoynelp dwo xaaj ajykzaz ywj ukq zaykza ep???<br><br><br> The Key Value is 22
Sindrei [870]

Answer:

The following transcript has been encoded can you decode it???

Explanation:

It is a ceasar cipher. Shift every letter in the alphabet by 22 positions.

3 0
3 years ago
What is the name for the individual sections of the ribbon in PowerPoint 20162
Julli [10]

Answer:

Tabs

Explanation:

The ribbon contains the tabs. The tabs contain the command groups which hold commands

IF THIS HELPS PLEASE MARK THIS ANSWER AS BRAINLIEST

6 0
4 years ago
A malware-infected networked host under the remote control of a hacker is commonly referred to as:
natali 33 [55]

Answer:

Option a: Trojan

Explanation:

A Trojan or Trojan horse is one of the computer malware that exist in computing world. Trojan often appears as a legitimate software to deceive user to activate it by social engineering. Once the Trojan is activated in the user computer, a hacker can remote control the infected computer for malicious purposes such as removing files, sending files, displaying message or rebooting computer.

However, Trojan cannot be replicated in the infected computer.

7 0
3 years ago
Read 2 more answers
Other questions:
  • HELP FOR JAVASCRIPT: 01. What is prototypical inheritance? 02. How can JavaScript be used to improve accessibility on the web? I
    6·1 answer
  • Why do you classify computers?
    6·1 answer
  • )finding an unused location in the hash table is called
    5·1 answer
  • Use the syntax SELECT ________ (expression) [Column Name] to limit the result set to the number of rows defined by the expressio
    10·1 answer
  • What are styles? built-in conditional formatting rules formatting applied with the Format Painter defined combinations of format
    15·2 answers
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • Please solve the ones you can. Solving Both will be appreciated. thank you
    13·1 answer
  • If a citation has a volume, title, and page numbers, it is a:
    9·2 answers
  • Koi jinda hei kya hello​
    13·2 answers
  • The iso 14001:2004 standards require documentation of a firm's environmental program. Which component requires a plan to improve
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!