Task Description: Implement the Tribonacci Function
Functionality: Create a function named tribonacci that calculates the n-th value in the Tribonacci sequence. The Tribonacci sequence is defined such that the first three values are 0, 1, and 1. Each subsequent value is the sum of the three preceding values, i.e., T(n) = T(n-1) + T(n-2) + T(n-3) for n ≥ 3.
Input/Output Requirements:
Input: An integer n (0 ≤ n ≤ 35) representing the index of the Tribonacci sequence to calculate.
Output: An integer representing the n-th value of the Tribonacci sequence.
File Requirements:
Implement your solution in a file named /app/solution.py.
The file should include the function signature as shown in the initial implementation.
Example:
For input n = 4, the output should be 4 since the Tribonacci sequence is 0, 1, 1, 2, 4.
For input n = 5, the output should be 7 since T(5) = T(4) + T(3) + T(2) = 4 + 2 + 1 = 7.