← ALL NOTES
Array

2996. Smallest Missing Integer Greater Than Sequential Prefix Sum

Given nums, the sequential prefix is the longest prefix where each element is exactly 1 more than the previous. Find the smallest integer x ≥ the sum of this prefix that is not in nums. Find the…

Loading…