Leetcode 1137. N-th Tribonacci Number
Return the nth Tribonacci number defined by T0=0, T1=1, T2=1 and Tn = Tn-1 + Tn-2 + Tn-3 for n>=3; with 0<=n<=37 the result fits in a 32-bit int and can be computed via simple iteration or constant-space DP.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.