Array of integers in an ascending order using merge sort

Assignment Help Basic Computer Science
Reference no: EM132324699

Merge sort the array and check prime numbers

A program which will sort an array of integers in an ascending order using merge sort, and indicate whether each int element is prime.

No memory leaks are allowed.

Steps:

  • A one-dimensional dynamic array of integers which is randomly populated with values between 1 and 50.
  • Establish the length of the array based on user input.
  • Error handle this value to make sure it is a valid number greater than or equal to zero and no larger than 20.
  • Print the elements of the array.
  • A copy of the array and use merge sort to sort it in an ascending order.
  • Print the elements of the sorted array.
  • Print out all prime numbers of the array.
  • End the program and make sure all memory has been freed.

Reference no: EM132324699

Questions Cloud

What are your feelings about current practice : What are your feelings about current practice? Do you agree or disagree with the current position of the IFRS and/or FASB in this area?
Make the journal entry to record the issuance of bonds : Monty Co. is building a new hockey arena at a cost of $2,560,000. It received a downpayment of $450,000 from local businesses to support the project.
Address object-oriented classes and objects : Discuss how algorithms address object-oriented classes and objects.
Brief description of the program : Comments including a brief description of the program, Input List and Output List, and full pseudocode. Place the pseudocode for each module above the module.
Array of integers in an ascending order using merge sort : A program which will sort an array of integers in an ascending order using merge sort, and indicate whether each int element is prime.
List the final minimum spanning tree : Mark on the graph showing the intermediate values, and list the final minimum spanning tree.
Indicate the total running time of the algorithm : Indicate the total running time of the algorithm using O-notation (function class). Clearly show your work.
Provide a summary for the tax issues of earnings of foreign : Ben Watson has asked you, the company's CFO, to research the U. S. GAAP and provide a summary for the tax issues of earnings of foreign subsidiaries.
Calculate the payroll per hour in line with the payroll act : Our payroll is split into calculating the payroll, and disbursing. Since most of our employees are employed as award wage bases, we calculate the payroll.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Market for ethanol in the united states

Consider the market for ethanol in the United States depicted in the figure to the right. Assume the world price of ethanol is $0.90 per gallon, and at that price the United States can buy as much ethanol as it wants without causing the world pric..

  Student ticket and non-student ticket

How much will be the student ticket and non-student ticket if the theater is allowed to charge different prices for different identify groups?

  Software development methodologies

Software Development Methodologies

  When are link state packets sent out

Adhere to APA formatting and reference guidelines when writing your response. Additionally, your response should be free of grammatical errors, use complete sentences, and give specific details to support statements.

  Advantage in a price setting model

Why there is second mover advantage in a price setting model where the assumption of simultaneity has been relaxed

  What about a low illness prevalence

Comment on what a high illness prevalence does to the positive predictive value (PPV). What about a low illness prevalence?

  Credit score annual income

If you do not meet requirements for loan, in regards to credit score annual income and whatever other requirements than a loan shall not be given.

  Create a new python program

Create a new Python program (you choose the filename) that contains a main function and another function named change_list.

  Analyze the residuals from this experiment

Write down a regression model that can be used to predict crack length as a function of the significant main effects and interactions you have identified in part (b).

  Research and identify the procedures

Conduct some research and identify the procedures that should be followed when entering into contractual arrangements with other service providers

  Positive numbers-corresponding squares

Write program which prints the following columns: the first 100 whole positive numbers, their corresponding squares, their corresponding cubes.

  What is the probability that the sample will have between

What is the probability that the sample will have between 31?% and 44?% of companies in Country A that have three or more female board? directors?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd