Create an application in cpp that uses a linked list

Assignment Help Data Structure & Algorithms
Reference no: EM131112142

Assignment - Josephus Problem - Linked Lists

Objectives:

• Fully implement an linked list from scratch
• Show understanding of using algorithms of a linked list

o Dynamic allocation
o Deletion
o Etc.

• Use Object Oriented skills to create a templated linked list class

Outcomes:

• Understand structured programming techniques in-depth.
• To learn data abstraction and object-oriented programming.
• To learn the fundamental data structures including stacks, queues, linked lists, and trees.
• To obtain a good foundation for further study in computer science.

Description:

Josephus Problem

"There are people standing in a circle waiting to be executed. After the first man is executed, certain number of people are skipped and one man is executed. Then again, people are skipped and a man is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last man remains, who is given freedom.

The task is to choose the place in the initial circle so that you survive (are the last one remaining)."

-- Wikipedia, https://en.wikipedia.org/wiki/Josephus_problem

Assume that the number of people, P, in the circle may be any number between zero and one hundred.

Assume that every Nth person around the circle is killed each turn, where N is an integer between one and twenty.

Specifications:

• Create an application in C++ that uses a linked list to represent the circle of people, numbered from 1 to P.
• Acquire the values P and N from the user at runtime via console input.
• Output the the individual that survives the mass execution.

Flash Version

• https://webspace.ship.edu/deensley/flash/JosephusProblem.html

There are several Java applet versions of this problem to check your work as you debug.

• https://www.wou.edu/~burtonl/josephus.html

Reference no: EM131112142

Questions Cloud

How large a per share common stock dividend will pay : Figurate Industries has 750,000 shares of cumulative preferred stock outstanding. It has passed the last three quarterly dividends of $2.50 per share and now (at the end of the current quarter) wishes to distribute a total of $12 million to its share..
Describe a time when you experienced effective communication : Describe a time when you experienced effective communication in a business environment.
What is the bullwhip measure for the retailer : a) What is the bullwhip measure for the retailer? b) What is the bullwhip measure for the manufacturer? c) What is the bullwhip measure for the supplier?
How much cash will the firm net from these stock sales : The firm is obligated by an earlier agreement to sell an additional 250,000 shares at 90% of the offering price. In total, how much cash will the firm net from these stock sales?
Create an application in cpp that uses a linked list : Create an application in C++ that uses a linked list to represent the circle of people, numbered from 1 to P. Acquire the values P and N from the user at runtime via console input. Output the the individual that survives the mass execution.
Analyzing magazine content : For this assignment you will analyze the content of three magazines. Choose three different magazine for your analysis. Look at the advertisements in the magazine and complete the chart to determine what kinds of advertisements are most common and..
What is the optimal order quantity : a) What is the optimal order quantity? b) What is the annual holding cost? c) What is the annual ordering (set up) cost? d) What are the annual costs of the silverware itself with an optimal order quantity?
Find z-scores that divide area under standard normal curve : Assume that the variable under consideration has a density curve. The area under the density curve that lies between 20 and 26 is 0.399. What percentage of all possible observations of the variable are either less than 20 or greater than 26?
How much debt does the corporation have on its books : A balance sheet balances assets with their sources of debt and equity financing. If a corporation has assets equal to $5.2 million and a debt ratio of 75.0%, how much debt does the corporation have on its books?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Display the dfs starting from a specified vertex

Design and implement a driver to show the following (check for 2 graphs; 1 is provided, including the starting vertex):Display the dfs starting from a specified vertex;Display the discovery/finishing time for each node in the graph;Show the Parenthes..

  Do you observe any changes in cluster memberships

Draw the graphic for the healthy set, representing the values, healthy and unhealthy and what is the degree of membership to the fuzzy set healthy of person B who has a BMI of 26.2? And to the fuzzy set unhealthy?

  Creating erd with primary, foreign keys and main attributes

A very small college wishes to keep track of history of all administrative appointments, The college chancellor may wish to know how many deans worked in college of business between January 1, 1960 and January 1 2008

  A multinational tour operator agency has gained new

a multinational tour operator agency has gained new business growth in the north american market through the use of

  Write down a program which explores the seating patterns

write a program that explores the seating patterns related to course performance by using an array of student scores.

  Create an asp.net project with visual studio.net

CpCreate an MS Access database called "Members.mdb." Add a table called "tblScores" with the following columns.

  Decryption speed and diffie-hellman

Increase of a single bit in the size of the encryption key doubles the amount of needed computations - Show how the recipient of the message, who knows e, produces the plaintext.

  Writing a java program

The history teacher at your school requires help grading a True or False test. The students' IDs and test answers are stored in a file document.

  Algorithm to categorize problem using big-theta notation

Find a simple algorithm for solving following problem and categorize it using big-theta notation: Divide the group of people into two disjoint subgroups (of arbitrary size) such that difference in total ages.

  Prove there exist no deterministic algo for election in ring

Prove that there exists no deterministic algorithm for election in rings of known, even size where communication is by synchronous message passzng.

  Enhance the pseudocode using arrays and loops

Enhance the pseudocode in the attachment by using arrays and loops. Also, instead of hardcoding the product names within the program, ask the user to enter the product names in addition to the prices

  How two types of assets are valued for balance sheet purpose

Explain how the 2-types of assets are valued for balance sheet purposes, using the following assets owned by a corporation that writes and sells software packages

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