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
4. In a relational database, entities are defined by
Inessa [10]

Answer:

C. attributes

Explanation:

A relational database is a database system that stores information within its servers. It has rows and columns that contain the data stored in them and which can be accessed at any time with the right administrative privileges.

In a relational database, entities are defined by their attributes. This is because an entity is the data that needs to be stored so, the attribute specifies that information and gives its value.

3 0
3 years ago
What are the two basic steps in communication
Andrei [34K]

The sender forms an idea.The sender encodes the idea in a message.

4 0
4 years ago
The term used to describe whereby old and new media are available via the integration of personal computers and high speed satel
garri49 [273]

The term used to describe whereby old and new media are available via the integration of personal computers and high speed satellite based phone or cable links is: media convergence.

<h3>What's a good illustration of media convergence? </h3>
  • Smartphones, laptops, and ipads are the finest instances of media convergence since they combine several forms of digital media, including radio, cameras, TVs, music, and more, into a single, straightforward gadget.
  • The blending of formerly separate media platforms and technologies through digitization and computer networking is referred to as media convergence. Another name for this is technical convergence.
  • Media ownership concentration, sometimes referred to as media consolidation or media convergence, is the process through which a smaller number of people or organisations come to control a larger portion of the mainstream media.
  • According to recent study, there is a rising amount of consolidation in the media sectors, which are already highly concentrated and controlled by a very limited number of companies.

To learn more about media convergence, refer to the following link:

brainly.com/question/25784756

#SPJ4

6 0
2 years ago
Drag each tile to the correct box. Arrange the statements in sequence to correctly explain what the field of science includes. a
erastova [34]

These refer to the elementary steps of the scientific method.

The correct order is as follows:

  • Keen observation of natural phenomena.

  • The use of imagination and creativity to test understanding and predictions.

  • An attempt to verify the understanding of observed natural occurrences establishing verifiable scientific knowledge

  • Continued observance and testing to revise scientific knowledge.

  • An understanding of how or why these natural phenomena occur.

Learn more about the scientific methods at the link below:

brainly.com/question/497944

3 0
3 years ago
Claire wants to use a conditional statement in JavaScript that provides a block of statement to be executed if the condition is
Illusion [34]
C because what she saying doesn’t add up
6 0
3 years ago
Read 2 more answers
Other questions:
  • If you want three vertical sections of text on your page, create _____.
    11·2 answers
  • Two of the goals of community mobilization are getting the community interested and
    6·1 answer
  • Problem # 1 [End of chapter problem] The following character encoding is used in a data link protocol: A: 01100111 B: 11110011 F
    14·1 answer
  • &gt;What is the output of the following code:
    5·1 answer
  • In which type of class methods is it typically necessary to filter bad arguments (either directly or indirectly with the help of
    13·1 answer
  • This isn't school related but if I get a 2 month free plan and it is expired and I don't have a card attached to my account will
    14·1 answer
  • A higher resolution image will mean a?
    13·2 answers
  • An alternative to hexadecimal notation for representing bit patterns is dotted decimal notation in which each byte
    11·1 answer
  • How to recover deleted photos after deleting from recently deleted
    13·2 answers
  • Explain employment opportunities in the networking field 
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!