We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87f90d8 commit 2220d07Copy full SHA for 2220d07
src/main/java/com/fishercoder/solutions/_1137.java
@@ -2,31 +2,6 @@
2
3
import java.util.stream.IntStream;
4
5
-/**
6
- * 1137. N-th Tribonacci Number
7
- *
8
- * The Tribonacci sequence Tn is defined as follows:
9
10
- * T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0.
11
12
- * Given n, return the value of Tn.
13
14
- * Example 1:
15
- * Input: n = 4
16
- * Output: 4
17
18
- * Explanation:
19
- * T_3 = 0 + 1 + 1 = 2
20
- * T_4 = 1 + 1 + 2 = 4
21
22
- * Example 2:
23
- * Input: n = 25
24
- * Output: 1389537
25
26
- * Constraints:
27
- * 0 <= n <= 37
28
- * The answer is guaranteed to fit within a 32-bit integer, ie. answer <= 2^31 - 1.
29
- * */
30
public class _1137 {
31
public static class Solution1 {
32
public int tribonacci(int n) {
0 commit comments