in reply to Re: (Golf) Building a Better Binary Tree
in thread (Golf) Building a Better Binary Tree

Doesn't every key in the binary tree have to be unique? Yours doesn't do that, given data of
( 2, 1, 3, 4, 7, 6, 5, 4, 3, 2, 7, 9, 5 )

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Re: (Golf) Building a Better Binary Tree
by jynx (Priest) on Oct 09, 2001 at 21:20 UTC

    i may be wrong but,

    The problem description says that the keys may or may not be distinct. It doesn't say we have to flatten the list to unique keys only. If i'm missing something please tell me, but i don't see where it says we must make the keys unique...

    jynx