Re: Linked list problem (puzzle)




CBFalconer wrote:
It is fairly hard to attain your objective when the original number
of TRUE nodes is odd. Assuming that is not so, simply distribute
the TRUE nodes alternately to each output list. There seems to be
no restriction as to the final distribution of FALSE nodes, but if
there was you could follow a similar strategy for them.

--
Chuck F (cbfalconer@xxxxxxxxx) (cbfalconer@xxxxxxxxxxxxx)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE maineline address!

So, the complexity of an algorithm to solve the problem would still be
linear, right? A constant time solution might not be possible. Am I
correct?

Regards,
Priya

.