...

/

Solution: N-th Tribonacci Number

Solution: N-th Tribonacci Number

Let's solve the N-th Tribonacci Number problem using the Dynamic Programming pattern.

Statement

Given a number n, calculate the corresponding Tribonacci number. The Tribonacci sequence TnT_n is defined as:

T0=0, T1=1, T2=1T_0 = 0,\space T_1 = 1,\space T_2 = 1
...