Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS301 Data Structures Assignment No 01 idea solution spring 2011
#1
Assignment No. 01
SEMESTER Spring 2011
CS301- Data Structures
Total Marks: 20

Due Date: 19/04/2011
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted code does NOT compile.
o The submitted assignment does NOT open or file corrupt.
o The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
Your Submission must include:

1. A working Make File (Dev-C++ project File).
2. All the Source Code (.h and .cpp files) necessary to compile and run your program.
3. Place all the files in a folder then Zip this folder and Upload it on VU-LMS

Note: Use Dev-C++ IDE.
o
Marks: 20

The Josephus problem is the following mass suicide "game": n people, numbered 1 to n, are sitting in a circle. Starting at person 1, a handgun is passed. After m passes, the person holding the gun commits suicide, the body is removed, the circle closes ranks, and the game continues with the person who was sitting after the corpse picking up the gun. The last survivor is tried for n - 1 counts of manslaughter. Thus, if m = 0 and n = 5, players are killed in order and player 5 stands trial. If m = 1 and n = 5, the order of death is 2, 4, 1, 5.

Write a C++ program to solve the Josephus problem for general values of m and n using circular linked list data structure.


Input:
 Number of People: n
 Number of Passes: m
Output:
 Order in which people are removed
 The survivor

Sample Run:
Enter total number of People playing the game: 10
Enter number of Passes: 3
----------------------------------------------------
Game Started!
----------------------------------------------------
 Person removed: 4
 Person removed: 8
 Person removed: 2
 Person removed: 7
 Person removed: 3
 Person removed: 10
 Person removed: 9
 Person removed: 1
 Person removed: 6
----------------------------------------------------
 The survivor is : 5
----------------------------------------------------



Attached Files
.zip   Spring2011_CS301_1.zip (Size: 125.8 KB / Downloads: 993)
Reply
#2
plz upload the solution tomorrow is last date....
Reply
#3
ok dear abhi tu kafi din han.
Reply
#4
today is the last date .. please upload the solution .. we have just a few hours left ..
Reply
#5
Xprt plz upload solution today is last date plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Reply
#6
[COLOR="rgb(153, 50, 204)"]Be quick . Tomorrow will be the grace day.And still we are far from the idea solution [/COLOR]
Reply
#7
ok g..... quizk
Reply
#8
plzzz send me cs301 slution
Reply
#9
oh yar helper do something as you know am busy
Reply
#10
plz sir i m to worry about this assignment plz plz sir kinly help me
send me assignment solution
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,320 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,906 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,926 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,163 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,240 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 1,965 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,662 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,798 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,698 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,795 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)