• Spoiler alert, Here is the solution to the puzzle.

    Spoiler alert, Here is the solution to the puzzle.

    ben.brugman (1/18/2013)


    -- Puzzle.

    --

    -- Using SQL I wanted to see what happend with the following puzzle.

    --

    --

    --

    -- 1

    -- 1 1

    -- 2 1

    -- 1 2 1 1

    -- 1 1 1 2 2 1

    -- 3 1 2 2 1 1

    --

    --

    -- Question is wat is the next line?

    -- And the line after that?

    --

    -- How does this progress when you continue?

    -- For the last question I used SQL.

    First line contains a 1, each next line describes the the line above.

    So the first line contains one 1. (1 1).

    The second line contains two 1's (2 1)

    The third line contains one 2 and one 1 (1 2 1 1)

    etc.

    I used replaces to continue this trend, just to see what was happening. I'll post the script for that in a next episode, not to give away part of the 'knowledge'. I used some of the kwowledge to build the solution. I would like to see other solutions, often others can come up with a far more elegant (or more efficient or both) solutions.

    Although posts not always contain have a usable solution, I always learn from the anwsers, often showing solution methods and techniques which open my mind.

    ben brugman