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
Bogdan [553]
4 years ago
8

Given the following Python function, find out an asymptotically tight bound of the algorithm in term of n (the input parameter).

This function returns a list of n integers. Each element in the list contains the value f(i) = i + ⌊ i 2 ⁄ ⌋ + ⌊ i 4 ⁄ ⌋ + ⋯ 1. Write your answer as Python comments in the file csc220a2.py
Computers and Technology
1 answer:
alexandr1967 [171]4 years ago
6 0

Answer:

Explanation:

There are two loops in the given code snippet:

1. Both the loops are nested

2. The outer loop which is for loop is running n number of times linearly.

3. The inner loop which is while loop is jumping in the power of 2, which makes it run log n number of times.

So the overall complexity of the code will be= n * log n

Time complexity(or upper bound)= O(n log n).

Hit the thumbs up if you liked the answer. :)

You might be interested in
Which tab allows you to review the slideshow timings?<br> O Home<br> O View<br> O Review<br> O File
disa [49]

Answer:

view

Explanation:

4 0
3 years ago
Which of these is a biotic factor in an aquatic ecosystem?
11111nata11111 [884]
The biotic factor in an aquatic ecosystem would be
A. Seaweed
8 0
3 years ago
What is the term given to the controls that let you interact with an operating system?
Sophie [7]
Inputs are the contols that let you interact with an operating system.
4 0
4 years ago
Building relationships during your career exploration is called A. clustering. B. futurecasting. C. matchmaking, D. networking.
Vaselesa [24]
Building relationships during your career exploration is called Networking. 
<span>when you're in career exploration phase, building a relationships with various people may expose you to various kind of opportunities that could benefit your career paths. 

Hope it helped!! :)</span>
5 0
4 years ago
Read 2 more answers
Employers hiring for entry-level positions in Hospitality and Tourism expect workers to learn the required skills after they sta
vovikov84 [41]
<h2>have basic skills required to do the job</h2>

Explanation:

expect workers to learn the required skills after they start:  

The must have basic skills then only they can employ to upgrade further skill

have the required skills before they start:  

We cannot expect all the skills. Skill will develop through experience too.

acquire the necessary skills through education: only if they have necessary education for performing the job, then only the company will short-list. So, this is an entry criterion.

have basic skills required to do the job: This is the right answer. This aspect is enough for an entry-level position.

8 0
3 years ago
Read 2 more answers
Other questions:
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    13·2 answers
  • In a cellular network, where does each wireless base station connect to?
    9·1 answer
  • _____ enable patients to use the Internet to compare the quality, safety, and cost information on hospitals nationwide.
    6·1 answer
  • After which stage in the information processing cycle can data be referred for future use?
    7·1 answer
  • What is the first step to apply the line and page breaks options to groups of paragraphs in a Word document?
    10·2 answers
  • The most common Unicode transformation formats are UTF- ______ and UTF-16.
    9·1 answer
  • GIVING 10 or 20 POINTS for brainliest HELP ASAP!! Instructions Click the links to open the resources below. These resources will
    10·1 answer
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
  • When was there a time that you feel you may have “failed” at something?
    13·2 answers
  • When you type in text in an image in a photo-editing software, where is it created?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!