Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Option 1: 7 ducks

    Duck Duck < 2 in front
       Duck   < of a duck
       Duck   < duck in the middle
       Duck   < a duck
    Duck Duck < 2 behind
Option 2: 5 ducks.

    Duck Duck < 2 in front
       Duck   < duck in the middle
    Duck Duck < 2 behind
Option 3: 3 ducks.

    Duck A  < front of C
    Duck B  < front of C, middle, behind A
    Duck C  < behind A
If the interpretations of the riddle are mixed between clauses, any number between 3 and 7 is also possible.


In fact, the original description doesn't say that these are the only ducks, so there could any odd number (>1) of ducks. We rule out even numbers since then the "middle" duck would be undefined.


    Duck Duck < Two ducks in front of a duck
      Duck    < Duck behind a duck 1, duck in the middle.
      Duck    < Duck behind a duck 2
Though that starts playing questionable games with "behind a duck", ie. we mix interpretations for "in front" vs "behind".




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: