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
which dual-stack architecture allows ipv4 and ipv6 at the network layer to access a single tcp/udp stack
Archy [21]

The dual-layer-IP allows ipv4 and ipv6 at the network layer to access a single tcp/udp stack.

<h3>What is the dual IP layer?</h3>

The word dual-stack is a word that connote a full or total duplication of all stages in the protocol stack ranging from its applications to the network layer.

Note that the dual-layer-IP method often gives room for a computer to run IPv4 and IPv6 simultaneously  at the network layer, and all of the IP stack can access a different TCP/UDP stack.

Learn more about  architecture  from

brainly.com/question/9760486

6 0
1 year ago
Se tiene un pilar de hormigón de 30 cm de lado y 5 m de altura. Presenta una densidad de 2400 kg/m3 y una resistencia a la compr
kakasveta [241]

Answer:

El pilar no podrá soportar una masa de 10 toneladas

Explanation:

La dimensión del pilar de hormigón se da de la siguiente manera;

La longitud del lado, s = 30 cm = 0,3 m

La altura del pilar, h = 5 m

La densidad del pilar, ρ = 2,400 kg / m³

La resistencia a la compresión del pilar, σ = 500 kg / m²

El área de la sección transversal del pilar, A = s² = 0.3 m × 0.3 m = 0.09 m²

La masa del pilar, m = ρ × A × h = 2,400 × 0.09 × 5 = 1,080

La masa del pilar, m = 1.080 kg

Tenemos;

\sigma = \dfrac{F}{A}

Dónde;

F = La carga aplicada

A = El área de la sección transversal

∴ F = A × σ

F = 0,09 m² × 500 kg / m² = 45 kg

Por tanto, la carga que el pilar puede soportar sin compresión = 45 kg <10 toneladas = 9.071,847 kg

El pilar no podrá soportar una masa de 10 toneladas.

6 0
2 years ago
How do I give brainliest to someone?
Nitella [24]
At the top of their name when they answer it should say “give brainliest”
6 0
3 years ago
Read 2 more answers
How did people figure qwerty keyboard set up, instead of the abcdef setup?
marissa [1.9K]

Answer:

They are arranged randomly because manual typewriters tended to jam if the user typed too fast - therefore the arrangement was intended to slow early typists down.

Explanation:

3 0
2 years ago
PLZ HELP ME!!
katen-ka-za [31]

Customer experience means different things to different companies, and objectives must be clearly defined at the corporate level to maintain consistency.

6 0
3 years ago
Other questions:
  • How often should administrators and network users be required to change their password?
    10·1 answer
  • Case project 5-1 Network Integration ​
    5·1 answer
  • How does this splitting wedge make work easier?
    15·1 answer
  • Which of the following journals is not aimed at the public as well as scientists?
    7·1 answer
  • Check my work a(n) ________ reference is an automatically created variable that holds the address of an object and passes it to
    15·1 answer
  • When planning your website, what is one of the key things you should consider
    12·2 answers
  • n a​ poll, 6767​% of Internet users are more careful about personal information when using a public​ Wi-Fi hotspot. What is the
    11·1 answer
  • The term integration mean?
    7·2 answers
  • Which category does this fall in identity theft​
    6·1 answer
  • 10 computer and operating systems errors​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!