Nth Tribonacci Number Leetcode Problems Java