in reply to Re: Re: Re: Re: Self-extracting compressed code!
in thread Self-extracting compressed code!
As for the brain-teaser, I imagine it's the same as telling whether two binary trees are isomorphic. I remember doing that on a problem set by putting them both in a canonical form (e.g. longest bits on one side). IIRC you had to assign a "weight" to each node based on the number and depth of its children, then always put the heaviest child on the left. I don't remember the exact details, but is it something like this?
/s
Update: Heap dependency removed, and if anything it's faster.
|
---|