Back to all patterns

1D DP

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the 1D DP pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Easy (1)

N-th Tribonacci Number

The Tribonacci sequence is defined as T(n) = T(n-1) + T(n-2) + T(n-3). Return T(n).

Key Signals:

Recurrence relationBase casesConstant space option