N-th Tribonacci Number
Try to solve the N-th Tribonacci Number problem.
We'll cover the following
Statement
Given a number n
, calculate the corresponding Tribonacci number.
The Tribonacci sequence is defined as:
, and for |
---|
The input number, n
, is a non-negative integer.
Constraints:
-
n
- The answer is guaranteed to fit within a 32-bit integer, i.e., answer