How to find contradiction in order of items in multiple sequences
Consider the case

A: 1 2 3 2 4 5
B: 1 2 2 4 5
C: 3 2 
D: 2 3
E: 2 2
F: 1 2 3 4 5


You report back:

1 2 3 2 4 5 contradicts 3 2 
1 2 3 2 4 5 contradicts 3 2
1 2 3 2 4 5 contradicts 3 2
1 2 3 2 4 5 contradicts 3 2 
3 2 contradicts 1 2 3 2 4 5
3 2 contradicts 2 3
3 2 contradicts 1 2 3 4 5 
3 2 contradicts 1 2 3 2 4 5
3 2 contradicts 2 3
3 2 contradicts 1 2 3 4 5
2 3 contradicts 3 2      
2 3 contradicts 3 2      
1 2 3 4 5 contradicts 3 2
1 2 3 4 5 contradicts 3 2


I used this code to test: ( http://goo.gl/QOEBao or http://www.tutorialspoint.com/compile_csharp_online.php?PID=0Bw_CjBb95KQMZGNRVXQ2Y0JlOU0 )

static void Main()
{
    List&lt;List&lt;String&gt;&gt; seqs = new List&lt;List&lt;String&gt;&gt;{
        new List&lt;String&gt;{
            "1", "2", "3", "2", "4", "5"
        },
        new List&lt;String&gt;{
            "1", "2", "2", "4", "5"
        },
        new List&lt;String&gt;{
            "3", "2"
        },
        new List&lt;String&gt;{
            "2", "3"
        },
        new List&lt;String&gt;{
            "2", "2"
        },
        new List&lt;String&gt;{
            "1", "2", "3", "4", "5"
        }
    };
    if (HasContradiction(seqs))
    {
        Console.WriteLine("yep");
        foreach(Tuple&lt;string, string&gt; x in Cont)
        {
            Console.WriteLine(x.Item1 + " contradicts "+ x.Item2);
        }
    } else {
        Console.WriteLine("nope");
    }
}


There's a few that are not correct - if I label them...

X 1 2 3 2 4 5 contradicts 3 2 
X 1 2 3 2 4 5 contradicts 3 2
X 1 2 3 2 4 5 contradicts 3 2
X 1 2 3 2 4 5 contradicts 3 2 
X 3 2 contradicts 1 2 3 2 4 5
Y 3 2 contradicts 2 3
Y 3 2 contradicts 1 2 3 4 5 
X 3 2 contradicts 1 2 3 2 4 5
Y 3 2 contradicts 2 3
Y 3 2 contradicts 1 2 3 4 5
Y 2 3 contradicts 3 2      
Y 2 3 contradicts 3 2      
Y 1 2 3 4 5 contradicts 3 2
Y 1 2 3 4 5 contradicts 3 2


Then these are wrong:

X 1 2 3 2 4 5 contradicts 3 2 
X 1 2 3 2 4 5 contradicts 3 2
X 1 2 3 2 4 5 contradicts 3 2
X 1 2 3 2 4 5 contradicts 3 2 
X 3 2 contradicts 1 2 3 2 4 5
X 3 2 contradicts 1 2 3 2 4 5


Basically, what you don't do is check for duplicates.

Now, there's two things this could mean:

First option, you don't actually support duplicates. It's logically impossible for there to be duplicates. In that case, you should take an ordered, unique collection as input (a sorted set, as it were). A weaker alternative might be checking if you have duplicates and throwing errors for that, if altering the signature is not possible.

Second option, you do support duplicates. In that case, you should alter your code to support duplicates.