Program method that track the true runtime of your algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13853624 , Length:

You currently work in an algorithm development group for a large multimedia, mobile device corporation. Your group has been tasked with creating an app that will play an audio file backwards (from end to beginning rather than the standard beginning to end). Because this app is likely to be used on a mobile device, your group figures that this algorithm should use as little memory and space as possible. Your group has therefore decided to construct this reversal order algorithm such that it is an "in-place" algorithm. This simply means that the audio file will be loaded to memory and reversed using the same memory locations (because you must use memory sparingly).

Assignment

  • Part 1: Before attempting this implementation, you choose to develop a simple prototype version of this algorithm in C++. Specifically, you will build an in-place, order reversal algorithm. This algorithm will take as an input an array of ints and will reverse the order of the elements in the array, in place (essentially using only the memory in the array). For example, if the array contains five elements [1,2,3,4,5], the output of the algorithm will be [5,4,3,2,1]. Comment your program.
  • Part 2: Using this prototype, you will analyze the time complexity and space complexity of your algorithm in the worst case. Specifically, for time complexity, count the number of steps for each line of code, and write down the total lines executed as a mathematical expression where n is the size of the input array. For space complexity, write an expression for the number of memory locations and components that are required for algorithm in the worst case. (Assume that each int is one location.)
  • Part 3: Program a method or class that will track the true runtime of your algorithm. Find the true runtime of your algorithm using arrays of varying sizes (e.g., n = 500, n = 1,500, and n= 2,500) using your new tool. Plot, on a Cartesian plane, the runtime of your algorithm as a function of the size of the input array, n.

Attachment:- IndividualProjects.rar

Reference no: EM13853624

Questions Cloud

Describe the process flow of a criminal case : Describe the process flow of a criminal case that has gone to trial instead of being settled through a plea bargain
Importance of ethical behavior within criminal court system : Importance of ethical behavior within the criminal court system. Ethical behavior must exist within a criminal court system to ensure defendants receive fair trials
Pro forma balance sheet and pro forma income statement : Prepare the pro forma Balance Sheet and pro forma Income Statement. The EFR will be a plug number that makes the balance sheet balance like in the class example.
Types of ethical violations within the criminal court system : Identify and discuss at least three types of ethical violations within the criminal court system that can have a negative impact on the court hearing process for a defendant
Program method that track the true runtime of your algorithm : Program a method or class that will track the true runtime of your algorithm. Find the true runtime of your algorithm using arrays of varying sizes.
Target proportions of firm a capital structure : The following balance sheet reflects market values of the target proportions of Firm A's capital structure.
Current market value of the firm : What is the current market value of the firm? What will the firm's market value be after the announcement of the new debt issue? (Note that total market value of debt will be D0 + D1 and the interest costs that must be subtracted from EBIT when ca..
Indifferent between the two investments : At what interest rate would you be indifferent between the two investments? At interest rates above/below this break-even rate, which investment would you choose and why?
Prepare entries to record the flow of costs into department : Prepare entries to record The flow of costs into Department 1 for direct materials, direct labor, overhead and The transfer of production costs to Department.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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