You can declare a 2 dimensional array in you're program.
Get each sensors value,normally is 1 or 0(Black is 0,White is 1),store in 2d array,then analysis it.
For example.
If your robot is running now and it have 5 sensors:
first time each sensors value: 1 1 0 1 1
second time each sensors value: 1 1 0 1 1 (Black is 0,White is 1)
third time each sensors value: 0 0 0 0 0
...
Then data in 2d array is:
{1,1,0,1,1}
{1,1,0,1,1}
{0,0,0,0,0}
...
Obviously we can know this's a T Junction.
So, you need to design a algorithm for your program,to compare those 1 and 0,let MCU know what those numbers mean,and to make control.