

Trees as Linked Lists in Common Lisp (2010) - urs2102
http://gajon.org/trees-linked-lists-common-lisp/

======
analognoise
Is it me or does the second figure look incorrect? I don't see a key to
differentiate between solid lines and dashes either, but I'm mobile now so I
can't easily check.

~~~
mbrubeck
The figure is correct. In the first part of the article, a tree is represented
as (cons root children). So the example tree

    
    
        (1 (2 6 7 8) 3 (4 (9 12)) (5 10 11))
    

has "1" at its root, and four children. Its first child

    
    
           (2 6 7 8)
    

is a tree with "2" at its root, and three children which are all leaves. And
so on.

The solid lines are parent relationships, and the dotted lines are sibling
relationships. For each list, the first two items are connected by a solid
line, and the remaining items by dotted lines.

~~~
analognoise
Ah, I see how they are equivalent now, thank you greatly.

------
enord
This is Very Basic Stuff(tm). I wonder if the same topic would receive similar
attention in, say, Java.

