Trains the technique from
LeetCode 1137N-th Tribonacci NumberThis is an original problem, written from a brief that listed the technique, the difficulty, the topics, the function shape and the input bounds — none of that problem's wording, examples, hints or editorials. The link is there so you can map your practice onto the standard set.
Same function shape, different story and different numbers.
A courier depot keeps a daily log of how many vans it sent out, numbering days from 0.
The log opens with a quiet day: no vans left the yard on day 0. Exactly one van left on day 1, and exactly one left on day 2. From day 3 onward the depot's rule is fixed: the count for a day is the three counts of the days right before it added together.
Given a day number day, return the number of vans the log shows for that day.
Example 1
Day `0` is the quiet day the log opens with, so nothing left the yard.
Example 2
Days `4` through `6` show 4, 7 and 13 vans, and day `7` follows from those three.
Example 3
The counts climb quickly once the depot's rule takes over, and day `26` is a six-figure count.
The editor is preloaded with this. It matches the parent problem's shape, so a solution that works here transfers to a judge unchanged.
def vans_dispatched(day: int) -> int:public int vansDispatched(int day)See the step-by-step animation, the intuition, and clean code in every language — free, no credit card.