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

  Reverse path flooding

Suppose we have a network of nodes connected via point to point links, and source S sends a message that will be broadcast to all nodes using Reverse Path Flooding.

  The definitions associated with graphs.

Understand the definitions associated with graphs. a. Connected undirected graph; loop and cycle; DAG; simple path; strongly connected graph; weakly connected graph; complete graph

  Data array a has data series from 1000000 to 1 with step

data array a has data series from 1000000 to 1 with step size 1 which is in perfect decreasing order.data array b has

  Database design activities

Assume Ray wishes to start a DVD rental program at his stores that he plans to call Henry's DVD Club. He refers to each of his consumers as members.

  Difference between sequential, random and binary file access

Discuss the difference between sequential file access, random file access, and binary file access? For each of the three types, provide an example of an application where the use of one type is better than the other 2-types.

  Create tree correspond to expression pre-order traversal

Let the algebraic expression E=(2x+y)(5a-b)^3. Create tree T which correspond to expression E and determine pre-order traversal of T.

  Efficient algorithm for computing single-source

Give an efficient algorithm for computing single-source shortest paths in an undirected graph G for which edge weights are 1 or 2. Describe all data structures needed to support your algorithm. What is the runtime of your algorithm?

  Working with physicists that hav an inert lattice structure

working with Physicists that hav an inert lattice structure, and they use this for placing charged particles at regual spacing along a straight line

  Determine the benefits of data mining to the businesses

Determine the benefits of data mining to the businesses when employing - Predictive analytics to understand the behavior of customers

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Decrypting the ciphertext to recover the plaintext

If you get ciphertext message YPHDCRPBEQTAA, decrypt to recover plaintext.

  Develop modified versions of the quicksort and mergesort

Using the recursive algorithm, described in the previous section, develop an iterative function with the same functionality as the recursive nextPermutation function. Recall, that the iterative function should not contain recursive calls - it uses..

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