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
Bond [772]
4 years ago
14

I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensiv

e to "swap" two elements. But looping over the elements and looking at their values is very inexpensive. I want to minimize swaps above all other factors. Choose the sorting algorithm we studied that will perform the best:
Computers and Technology
1 answer:
Ann [662]4 years ago
4 0

Answer: Provided in the explanation section

Explanation:

The question to this problem says;

Question:

I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensive to "swap" two elements. But looping over the elements and looking at their values is very inexpensive. I want to minimize swaps above all other factors. Choose the sorting algorithm we studied that will perform the best:

ANSWER

1. Merge Sort

Because merge sort uses additional memory instead of swapping the elements.

2. Merge Sort and Quick Sort both can be used with multi processor.

cheers i hope this helps !!!

You might be interested in
From which os did windows xp evolve?
PSYCHO15rus [73]

Answer: Windows 2000

Explanation: I researched it and multiple sites said that it was Windows 2000.

<u><em>Hope this helps!!! :)</em></u>

7 0
1 year ago
If you want to add a picture to your document, you can __________. (Select all that apply.)
attashe74 [19]
- insert a picture file into your document
&- use the Copy and Paste functions to place a picture in your document

6 0
3 years ago
Modify the sentence-generator program of Case Study so that it inputs its vocabulary from a set of text files at startup. The fi
Snezhnost [94]

Answer:

Go to explaination for the program code.

Explanation:

Before running the program you need to have these files created like below in your unix box.

Unix Terminal> cat nouns.txt

BOY

GIRL

BAT

BALL

Unix Terminal> cat articles.txt

A

THE

Unix Terminal> cat verbs.txt

HIT

SAW

LIKED

Unix Terminal> cat prepositions.txt

WITH

BY

Unix Terminal>

Code:

#!/usr/local/bin/python3

import random

def getWords(filename):

fp = open(filename)

temp_list = list()

for each_line in fp:

each_line = each_line.strip()

temp_list.append(each_line)

words = tuple(temp_list)

fp.close()

return words

articles = getWords('articles.txt')

nouns = getWords('nouns.txt')

verbs = getWords('verbs.txt')

prepositions = getWords('prepositions.txt')

def sentence():

return nounPhrase() + " " + verbPhrase()

def nounPhrase():

return random.choice(articles) + " " + random.choice(nouns)

def verbPhrase():

return random.choice(verbs) + " " + nounPhrase() + " " + prepositionalPhrase()

def prepositionalPhrase():

return random.choice(prepositions) + " " + nounPhrase()

def main():

number = int(input('Enter number of sentences: '))

for count in range(number):

print(sentence())

if __name__=='__main__':

main()

kindly check attachment for code output and onscreen code.

6 0
3 years ago
NEED HELP RIGHT NOW!!! Which of the following is the definition of a privacy policy? * 5 points - A legal document that an app o
Marina86 [1]

Answer:

A legal document that an app or a website must provide to describe the rules the company and users must obey when they use the app.

6 0
3 years ago
How technology bacome the mode of revealing​
maria [59]

Answer:

afefdasf

Explanation:

3 0
3 years ago
Other questions:
  • The protocol that makes it possible for a Macintosh web browser to be able to retrieve a Web page from a Microsoft Web server is
    8·2 answers
  • Look at the graph below. Which statement is TRUE based on the graph of an egg drop experiment?
    10·1 answer
  • A manager wants to set up an area that is not on the LAN but not quite on the Internet. This area will house servers that will s
    5·1 answer
  • In reduced visibility conditions you need to work especially hard to gather visual information because
    7·1 answer
  • What is the value of the result after the following statement is executed? int result = 2 + 3 + 4 ;
    7·1 answer
  • How many pieces can be connected on to a to an SPS​
    11·1 answer
  • Which of the following technologies is an example of social media
    12·1 answer
  • Select the correct answer.
    15·1 answer
  • How can she change that value so it is reflected in the chart in her presentation?
    5·2 answers
  • What is Virtual Storage Configuration and Management, as well as Virtual Machine Management?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!