[OT] Retreating from Iraq

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Oct 13 15:44:57 PDT 2008


BCS wrote:
> Reply to Benji,
> 
>> BCS wrote:
>>
>>>> Sort everyone under you (directly or indirectly)         <<<<<
>>>> by the number of
>>>> subordinates they have. Pick the subordinate with the most
>>>> subordinates and call the next man in line to them. remove every
>>>> subordinate down that chain of command and repeat.
>>>>
>>>> This assumes that the depth of command is more or less the same
>>>> across the board.
>>>>
>>> This is based on the ssumption that the people with the most
>>> subordinates need to get started first.
>>>
>> But consider this case...
>>
>> I have two subordinates: Dirk and Deek. Dirk has only one subordinate
>> of his own, but Deek has three. It seems like I should call Deek
>> first.
>>
>> But what if Dirk's single subordinate has twenty subordinates of his
>> own, which Deek's subordinates are leaf-nodes? In that case, it makes
>> a whole lot more sense to call Dirk first.
> 
> my solution does exactly that. It first calls the commander, however 
> removed, from whoever has the most subordinates. Assuming that each call 
> take the same amount of time, the man with the most subordinates will be 
> the first man at his rank to get the order.

Define subordinate.

Andrei



More information about the Digitalmars-d mailing list