Click here to read the complete problem statement.
is there any use of the first criteria ??
cz I solved it without that
T(n)=T(2-n)+2
T(2)=T(2-2)+2=T(0)+2
But T(2)=8
Hence, T(0)+2=8
So, T(0)=6
T(1)=T(1-1)+1=T(0)+1=6+1=7
T(3)=T(3-1)+1=T(2)+1=8+1=9
T(4)=T(4-2)+2=T(2)+2=8+2=10
The pattern is,
6-0=6 ; when T(0)
7-1=6 ; when T(1)
8-2=6 ; when T(2)
9-3=6 ; when T(3)
10-4=6 ; when T(4)