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

  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