kottans / kottans/algorithm_club

skiena 2-52 top challenge

Open
#33 0 comments 0 reactions 0 assignees View on GitHub
interview question
Dominant language
JavaScript
Stars
14
Forks
14
PR merge metrics
No merged PRs in 30d

Description

> continuing the 2-51 problem

Six pirates must divide $300 dollars among themselves. The division is to proceed
as follows. The senior pirate proposes a way to divide the money. Then the pirates
vote. If the senior pirate gets at least half the votes he wins, and that division
remains. If he doesn’t, he is killed and then the next senior-most pirate gets a
chance to do the division. Now you have to tell what will happen and why (i.e.
, how many pirates survive and how the division is done)? All the pirates are
intelligent and the first priority is to stay alive and the next priority is to get as
much money as possible.

-------------
**Task**

Reconsider the pirate problem above, where only one indivisible dollar is to be
divided. Who gets the dollar and how many are killed?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the pirate scenario and the stated continuation from problem 2-51. Work through the voting and survival rules for the indivisible-dollar case, accounting for the pirates' priorities. Done means documenting who receives the dollar, how many pirates are killed, and why.

Written by the indexing model from the issue text.

Assessment

Domain
content
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.