Nth Tribonacci Number
Explore how to compute the nth Tribonacci number by starting from a naive recursive approach and optimizing it using memoization and bottom-up techniques. Understand time and space complexity trade-offs and improve solutions to constant space usage while maintaining efficient run time.
Statement
Tribonacci numbers are a sequence of numbers where each number is the sum of the three preceding numbers. Your task is to find the Tribonacci number.
The Tribonacci sequence is defined as:
| , and |
|---|