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
olchik [2.2K]
3 years ago
14

In this problem you will test and analyze the following sorting algorithms: Selection, Bubble, Insertion, Merge, and Quick. You

can use the code provided in the lecture slides after modifying it to meet the following requirements: 1. Analyze the algorithms by sorting, in ascending order, arrays of 1000 integers (i.e., no need to use template functions as in the lecture slides). 2. Create three arrays of 1000 integers: BST, AVG, and WST. Where a. BST has 1000 integers already sorted in ascending order (e.g., 10, 20, 30, ...etc.). b. AVG has 1000 randomly generated integers, where each integer is between 0 and 100,000. c. WST has 1000 integers sorted in reverse order (e.g., 1000, 990, 980, ...etc.). 3. Test the five sorting algorithms with three 1000‐integer arrays: tBST, tAVG, and tWST. Before testing each algorithm, these three arrays (tBST, tAVG, and tWST) must be re‐initialize as copies from BST, AVG, and WST respectively (you can write a function to carry out the copy task). This is to make sure that all algorithms are tested with an identical set of arrays.
Computers and Technology
1 answer:
Tpy6a [65]3 years ago
5 0

Answer:

1) Selection, bubble and insertion sort requires no moves in the sorted array because there will be n comparisons in the array and no swapping would take place after each comparison so zero moves.

2) Bubble and insertion sort result in 999 comparisons as we are required to iterate only one time over the array. this can be easily explained from the diagram as in bubble sort all the elements will be in their sorted position so each element will be encountered only once.

3) In selection sort, any element is compared with all the elements and accordingly smaller is paced first so in the reverse sorted array there will be at least n^2 comparisons so n^2 moves.

4) in merge sort an array is always divided into n nos of parts and then sorted so in worst case as well as best case the array will be divided so same numbers of moves.

You might be interested in
3. A vulnerability is: a. A hacker searching for open ports b. A known attack method c. An incorrectly implemented policy d. All
ELEN [110]

Answer:

A

Explanation:

A hacker searching for open ports denotes vulnerability of computer (to hacking).

Cheers

7 0
3 years ago
An insurance company utilizes SAP HANA for its day-to-day ERP operations. Since they can’t migrate this database due to customer
hichkok12 [17]

Answer: An Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network

Explanation:

Based on the information given, an Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network need to be configured outside of the VPC for them to have a successful site-to-site VPN connection.

The Internet-routable IP address will be used in the identificatiob of each computer through the use of the Internet Protocol for the communication over a network.

3 0
3 years ago
What tool is included with windows 8 that will help you connect to the directaccess server when you have problems and can be use
Elina [12.6K]
None that I know. Many third party apps.
4 0
3 years ago
What was the strategy the company adopted for ERP implementation?
SashulF [63]

Answer:

Big Bang or Phased Approach – ERP Implementation strategies include Big Bang, Phased, Hybrid, and Parallel Adoption. Each organization requirements are different and as such, the project management method is itself evolving using PPM, SCRUM, and DevOps.

8 0
2 years ago
What file can you edit on a linux system to configure shared folders using samba?
TiliK225 [7]

/etc/samba/smb.conf is the file you can edit on a linux system to configure shared folders using samba.

<h3>What is a Linux system ?</h3>
  • A Unix-like operating system (OS) for desktops, servers, mainframes, mobile devices, and embedded devices, Linux is open source and user-developed.
  • One of the most broadly supported operating systems, it is supported on virtually all popular computing platforms, including x86, ARM, and SPARC.
  • Windows OS is a for-profit operating system, whereas Linux is an open-source alternative. In contrast to Windows, which lacks access to the source code, Linux allows users to modify the code as needed.
  • Applications, interfaces, programs, and software are all produced through Linux programming. Desktops, real-time apps, and embedded devices frequently employ Linux code.
  • Programmers can learn about the Linux kernel for free online, enabling them to use, modify, and develop Linux without restriction.

Learn more about linux system refer to :

brainly.com/question/25480553

#SPJ4

6 0
1 year ago
Other questions:
  • Information systems security is the collection of activities that protect the information system and the data stored in it.
    12·1 answer
  • Targeting encourages drivers to scan far ahead and _____________. A. focus their visual attention on the next point on the road
    8·2 answers
  • Jennifer frequently uses a few programs on her laptop. Where will she find all the frequently used program icons in her computer
    13·1 answer
  • Select the correct answer.
    6·1 answer
  • Why do people still use Intel HD graphics for gaming?
    8·1 answer
  • 2:3:5<br>_ _ _<br>3 2 8<br><br><br><br>find ratio​
    5·1 answer
  • Reply emailing a student who is asking about audio materials​
    6·2 answers
  • Your team has provisioned an Auto Scaling Groups in a single Region. The Auto Scaling Group at max capacity would total 40 EC2 i
    14·1 answer
  • Find examples of conic sections in art and architecture. Visit Web sites to find pictures of artwork or buildings that illustrat
    14·1 answer
  • Which access object cannot be used to enter or edit data
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!