Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5944493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:32:41+00:00 2026-05-22T16:32:41+00:00

There are 5 members sitting around a table. Key value is the number of

  • 0

There are 5 members sitting around a table. Key value is the number of members sitting around the table. So now the key value will be 5. A terrorist told the members that as you are 5 members I will count from first member and the person who is counted 5 will be shot dead.
He counts and the 5th person dies. Once again he counts up to five and the 1st person dies. Once again he counts and the 3rd person dies, and now 2 and 4 are remaining.He counts the no between them finally 4 will be counted as 5 and he is shot dead.The last person remaining will be 2.

Like the same if tried for seven persons the answer will be 8.
And for 8 persons the answer will be 4.

How to set a formula for this so that computer can shoot the person correctly.

I guess it might be in a circular linked list by giving a token value to the members.But i could not arrive at an equation. So by giving the key value the person who will live will be determined.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:32:41+00:00Added an answer on May 22, 2026 at 4:32 pm

    This is a well known problem called Josephus problem. Check wikipedia and mathworld for possible solution. And you can use Google for numerous articles on it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any particular reason that all data members in a class are private
This question assumes there's a blessed central repository that members of a team clone
I generated a Members table and a MembersType table which has a primary key
I don't understand the class TextCompositionEventArgs. There are members of type string named ControlText,SystemText,Text.
Is there a jQuery way to perform iteration over an object's members, such as
Is there a way to not be forced to include members with the MustOverride
Is there a keyword in java to allow explicit invocation of members of the
I see uses of depreacted members in java.math.BigInteger.bitCount() Is there an alternative for the
I have an entity which has 15 members. There are various types of members
I've been playing around with c++ lately and wondered why there were so many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.