in reply to Re^2: Formalizing an array type problem, looking for solution
in thread Formalizing an array type problem, looking for solution

I think the OP means a consensus path is a join of all the segments where the segments are joined by overlaying identical elements (thus deleting one) at the joining ends. By this rule the two valid "consensus paths" are

A+ : B+ : E+ : D+ : C- C+ : D- : E- : B- : A-

which are the reverse (and sign change) of each other.

I do wish the OP would speak up because I have a sneaking suspicion his real data is not all single letters, and so my solution Re: Formalizing an array type problem, looking for solution above will need "tweaking".

Replies are listed 'Best First'.
Re^4: Formalizing an array type problem, looking for solution
by GrandFather (Saint) on Sep 04, 2016 at 21:08 UTC

    I replied to your code because I assumed it was the OP who'd forgotten to log on. Yes, it'd be nice if the OP would follow up some of the questions and suggestions.

    Premature optimization is the root of all job security