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
andrew11 [14]
3 years ago
14

1. Given a sequential list with n numbers, represented in a one-dimensional array A) Write an algorithm to check if the list has

any duplication. Explain the time complexity of your algorithm. Can you think of a better algorithm to do the job? If so, briefly explain. B) Write an algorithm to find all the duplicate numbers in the list, if any. Explain the time complexity of your algorithm. Can you think of a better algorithm to do the job? If so, briefly explain.
Computers and Technology
1 answer:
lutik1710 [3]3 years ago
8 0

Answer:

Define a function that accept a list as an argument. Save the length of the list as a variable and cast the list to a set and also save the length to a variable.

If the result of the subtraction of the set length from the list length is not equal to zero, then the list have duplicates.

Explanation:

A sample of the source code using Python,

def list_duplicate( list ):

list_len = len( list )

new_set = set( list )

set_len = len( new_set )

If list_len - set_len != 0 :

Print( " The list has duplicate " )

You might be interested in
ANSWER ASAP, I'LL MARK THE BRAINLIEST
Travka [436]

Answer:

Push to make switch

Explanation:

The sound is created after you push it. Pushing it is the input and the sound is the output

4 0
3 years ago
Which best describes the benefits of renting a home
ANTONII [103]
Is it multiple choice or an essay question? If its an essay question I would say Living alone, being able to rent YOU'RE own home, and probably being able to decorate it the way you want. 
5 0
3 years ago
Read 2 more answers
What is a digital pen called<br><br>A digital pen is called a ____
steposvetlana [31]
A digital pen is a battery-operated writing instrument that allows the user to digitally capture a handwritten note or drawing. Typically, a digital pen comes with a Universal Serial Bus (USB) cradle to let the user upload the handwritten notes to a personal computer (PC).

Sometimes called a smart pen or stylus.
4 0
3 years ago
Read 2 more answers
A(n) ____ is a computer that requests and uses network resources from a(n) ____.
Crazy boy [7]

A(n) client exists a computer that requests and utilizes network resources from a(n) server.

<h3>What is a computer network?</h3>
  • A computer network is a collection of computers that share resources that are available on or provided by network nodes.
  • The computers communicate with one another via digital links using standard communication protocols.
  • These links are made up of telecommunication network technologies that are based on physically wired, optical, and wireless radio-frequency means and can be configured in a variety of network topologies.
  • Nodes in a computer network can be personal computers, servers, networking equipment, or other specialized or general-purpose hosts.
  • They can be identified by network addresses and have hostnames.
  • Local-area networks (LANs) and wide-area networks (WANs) are the two basic network types.
  • A(n) client exists a computer that requests and utilizes network resources from a(n) server.

To learn more about computer network, refer to:

brainly.com/question/8118353

#SPJ4

6 0
1 year ago
Which is true of case-based reasoning (CBR)?
DaniilM [7]

Answer:

The correct option is Option C: It matches a new problem with a previously solved problem and its solution.

Explanation:

Case-based reasoning (CBR) is used when someone tries to solve new problems based on old problems that were similar. The person applying case-based reasoning would look for the solutions to these similar past problems and try to apply them to the new case. For example, a doctor who tries to treat a patient based on what was successful with a prior patient with a similar problem is applying case-based reasoning. In some instances, these problems are available in a database and ideally, that is how it is conceived, but it would depend on the field and the kind of problems. There is no universal global network dedicated to CBR as a whole (other than generic searches on the internet in general). One example of a specific CBR database is the European Nuclear Preparedness system called PREPARE.

4 0
3 years ago
Other questions:
  • What do the points on this website do?
    14·2 answers
  • What information should be included in the closing paragraph of a thank-you letter? a. Mention skills that were omitted during t
    6·2 answers
  • What is a slide master ?
    8·2 answers
  • Olivia is trying to save for a new laptop computer. To help her save, she should start a _____. database financial statement per
    7·2 answers
  • _____ refers to the busiest calling hour of the day, week, month or year. And _____ refers to the average length of time the sub
    14·1 answer
  • To connect a peripheral device to a computer to exchange data, find the appropriate ________ for the device.
    7·1 answer
  • When you heat a pot on a stove, the handle gets warm. which type of heat transfer is possible
    10·2 answers
  • Strengths and weaknesses about esport
    10·1 answer
  • You are developing a Website that is going to be viewed extensively on smartphones and tablets. Which of the following should yo
    7·1 answer
  • ....is an act of introducing an invention into market on business basis for profit​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!