translate using enhantafel tree abcdefg!!!!!!!! a bc defg !!!!!!!! a b c d e f g !! !! !! !! rule any symbol for all input if their is nothing at current position return to begin if their is sibling output symbol and return to begin if symbol is alike input goto leftchild if he as sibling , output and return to begin else update input else symbol is different from input goto left child but dont update input algo fn symbol(ptr, code) return code @ ptr fn sibling(symbol) if symbol have two time the same child output symbol return true else return false fn parse(input, ptr,code) if symbol is null return 0 if sibling return 0 else if symbol==input if leftchild have sibling return 0; else return leftchild else return parse(input, rightchild, code) code = load(); ptr=0 while true c = input() ptr = parse(c, ptr, code ) it is possible to use real binary tree this open the possiblity to use string as symbol i am you happy want are they :o) ? happyness ? happy are . . . . :O) ? . . :O) ? happy . . . .