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

  System analystis you are required to analyse the

you are required to analyse the effectiveness of the qantas online air ticketing system. to do this you are required to

  Question about edge connectivity

The edge connectivity of an indirected graph is minimum number k of edges that must be removed to disconnect the graph.

  Find fraction of time during which queue grows

Suppose now there are three users. Find the probability that at a given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows.

  Question 1you are required to create a detailed analysis

question 1you are required to create a detailed analysis for each of the following array-based sorting algorithmsa

  Determining worst-case time complexity

The recent discovery of the following fragment of uncommented procedural C code in the Sunlab has caused a big scandal. What is the worst-case time complexity of foo(a,1,N,k), and for which inputsdoes it occur?

  What is the difference between syntax and semantics

Explain the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm.

  What items do we require for a small business wlan what

imagine that you work at a small company with 75 employees in a modern office building. some of the employees are eager

  Creating algorithm to implement function

Create an Algorithm to implement the given function and explain how the required task can be achieved in a step by step process.

  Explain compression algorithms are often used in forensics

"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.

  Definition of a method isreverse

Provide the definition of a method, isReverse , whose two parameters are arrays of integers of equal size. The technique returns true if and only if one array is reverse of the other.

  What are the major business objectives

What are the major business objectives and processes operations that the airline company carries out - Describe the stakeholders involved

  Discuss infix to postfix conversion

This part will use both a stack and queue in order to convert expressions from infix to postfix notation.

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