TCS
Company
if g[0]=1,g[1]=-1
g[n]=2*g[n-1]-3*g[n-2]
then calculate g[4]
Read Solution (Total 5)
-
- g(2)=2*(-1)-3*(1) =-5
g(3)=2*(-5)-3*(-1)=-7
g(4)=2*(-7)-3*(-5)=+1
Ans is 1.. - 13 years agoHelpfull: Yes(15) No(0)
- put n=2
g[2]=2*g[1]-3*g[0]=(2*-1)-3*1=-5
g[3]=(2*-5)-(3*-1)=-7
g[4]=-14+15=1 - 13 years agoHelpfull: Yes(3) No(0)
- g(2)=-5,g(3)=-7 so
g(4)=+1.
- 13 years agoHelpfull: Yes(1) No(0)
- g[4]=11
g[2]=-5
g[3]=-2 - 13 years agoHelpfull: Yes(0) No(2)
- g[2] = 2*g[1] - 3*g[0]
g [2] = 2* (-1) - 3* (1)
g[2] = -5
g[3] = 2*(-5) - 3*(-1)
g[3] = -10 +3 = -7
g[4] = 2* (-7) - 3*(-5) = -14+15 = 1 - 8 years agoHelpfull: Yes(0) No(0)
TCS Other Question