Practice: Two pointers
0 of 4 solved
About these problems
Apply, Connect, Reason and Stretch describe difficulty within this topic, not an official contest rating. Open any problem in any order; reading the chapter first is optional.
- 1Target pairDetermine whether two different positions in a nondecreasing array sum to x.ApplyNot started
- 2Longest affordable runFind the greatest length of a consecutive block whose sum is at most k. All values are positive. Print 0 if no nonempty block fits.ConnectNot started
- 3Count affordable runsCount all nonempty consecutive blocks whose sum is at most k. All values are positive.ReasonNot started
- 4At most k signalsFind the longest consecutive block containing at most k distinct values.StretchNot started