Evaluate the time complexity of algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13701585

Question: You need to write out using pseudo-code your algorithm.

You will be designing a non-member function that accepts as its argument one dynamic bag object (header file found in figure 4.9).  This function will return a reference to a new dynamic bag object. 

This new object will be a palindrome of the input object.  For this assignment you can assume that the class has an overloaded [ ] operator (array notation operator) that is used to access the elements of the bag. 

Also, the "pivot" point in the array will be repeated.  This means that the palindrome will be of the form 1234554321 and not 123454321 (notice that the pivot of 5 is repeated).

After you prepare your algorithm you would like to tell me what its time complexity is using Big-O notation. Can you evaluate the time complexity of this algorithm?

Reference no: EM13701585

Questions Cloud

Create application that list accounts from a dictionary : Create an application that list accounts from a Dictionary Object. Create an Account Class that contains an ID, Name, and Balance.  Disaply the account in a ListBox.
The great non-debate over international sweatshops : According to Maitland in "The Great Non-Debate over International Sweatshops," it was the Wal-Mart Corporation that broke the news (before a congressional committee) that Kathie Lee Gifford's clothing line was being produced by teenagers w..
Find the balance of the savings account : develop java application to find the balance of the savings account after the end of year - Write an application with three labeled text fields, one each for the initial amount of a savings account, the annual interest rate, and the number of years..
James builds brick walls for custom homes : James builds brick walls for custom homes. he annual sells are $300,000, and his net income is $18,000. he has assets of $100,000 invested in his business. the net profit margin for james is?
Evaluate the time complexity of algorithm : You will be designing a non-member function that accepts as its argument one dynamic bag object (header file found in figure 4.9).  This function will return a reference to a new dynamic bag object.
The principles of behavioral management : Discuss some of the ways in which the principles of behavioral management and operations management can throw light on the Steinway process. How
Calls the function readarray to read data into the array : Write a function void readArray(int arr[], int length) to read in length many values into the array arr.
Calculate monthly mortgage payments : Write a program that will calculate monthly mortgage payments on a house purchase.  The equation you'll want to use is
Implement uniform random number generator : Implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Explain solution to recurrence-appealing to recursion tree

Solve the following recurrence relations by the method of your choiceT(n) = 1 for n = 4 and T(n) =pnT(pn) + n for n > 4. Argue that the solution to the recurrence T(n) = T(n=3) + T(2n=3) + cn is (n lg n) by appealing to the recursion tree.

  Question about pure aloha

A group of N stations share a 56-kbps pure ALOHA channel. Every station outputs a 1000-bit frame on an average of once every one-hundred secs, even if the previous one has not yet been sent.

  Analyze a basic set of requirements for a problem

Analyze a basic set of requirements for a problem - compose C language programs and compile a program using Microsoft Visual Studio 2012

  Describe the jsp life cycle

Draw a diagram of the various events and transformations. Describe how you might implement logging in as used in the workshops using the session mechanism explaining what Java classes are involved and using code snippets.

  Designing and populating a course table

Use data to design and populate a course table. Designate the CourseID field as a Primary Key and permit your database to automatically produce a value for this field.

  Find a shortest-path from u to v

find a shortest-path from u to v, and we have a *valid* heuristic, i.e.: For every node w, we have a value a(w) such that the distance from w to v in G is at least a(w) for all nodes w.

  Algorithms to insert entry into list and find entry in list

In array is pointer to linked list of nodes each of which starts with corresponding letter. Write algorithms to insert the entry into list and to find entry in the list.

  Creating seven subnets on the network

Assume your corporation is assigned the network address 150.50.0.0. You need to construct seven subnets on the network. A router on one of the subnets will connect the network to Internet

  Create algorithm to read arbitrary number of data record

Create the algorithm to read arbitrary number of data records, each containing name, age, and code. Code of 1 will indicate female, a code of 2 will indicate male.

  Calculations on rows and columns of an array

Make a menu bar with a document menu that includes a Perform Action command and an Exit command. The Perform Action command calculates either the sum or the average of rows or columns in array and displays result in a message box.

  Question about disk writing speed

Think about a disk holding documents with an average file length of 5 KB. Each document is allocated contiguously on adjacent sectors.

  Advantage of fast running time of insertion sort

Running time of quicksort can be enhanced in practice by taking advantage of fast running time of insertion sort when its input is "nearly" sorted.

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