here is the code plan i wrote up so far, no coding done yet;

updates still to do:

- the words are in the articles lines
i write the line the word is on, as the first word, then i write the words next to it that are in that line

1 lion and mouse

2 lion and mouse

3 and mouse

4 lion and mouse

5 lion and

6 lion and mouse

7 lion mouse

- sort article so adjacent lines that share the same words, erase the outer line

2 lion and mouse

3 and mouse

4 lion and mouse

5 lion and

6 lion and mouse

7 lion mouse

- in groups of two, group the outer to inner lines,
the top and bottom line are the first group,
the second from the top and the second from the bottom are the second group,
etc.

2 lion and mouse
7 lion mouse

3 and mouse
6 lion and mouse

4 lion and mouse
5 lion and

- the words on a line are equal or not equal.
"and" = "lion" in line 5.
"and" = "mouse" in line 3.
"lion" = "mouse" in line 7.

2 lion = and = mouse
7 lion = mouse != and

3 and = mouse != lion
6 lion = and = mouse

4 lion = and = mouse
5 lion = and != mouse

///////////////
7 lion mouse = group a
///////////////
3 and mouse = group b
///////////////
5 lion and = group b
///////////////

____________________

my question is what should i do to do the last step using c sharp code?

this step;

Code:
- the words on a line are equal or not equal.
"and" = "lion" in line 5.
"and" = "mouse" in line 3.
"lion" = "mouse" in line 7.

2 lion = and = mouse
7 lion = mouse != and

3 and = mouse != lion
6 lion = and = mouse

4 lion = and = mouse
5 lion = and != mouse

///////////////
7 lion mouse = group a
///////////////
3 and mouse = group b
///////////////
5 lion and = group b
///////////////