You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
F(N) = F(N-1) + F(N-2) + F(N-3), so using the fact that we only need last three values, we can build up the solution taking first 3 values of F(0) = 0, F(1) = 1, F(2) = 1, and build the solution upto N using previous three values.