Back to problems

Cumulative Views Reach Target Day

Algorithm · Capital One · Easy

Examples Example 1 Example 2 Requirements You receive an integer array visits[], where visits[i] is the number of visits recorded on day i, along with an integer target. Return the first index i for which sum(visits[0..i]) >= target. Days are numbered from 0 in this prompt. Return -1 when the cumulative count never reaches the target. Notes This is intended to be the most straightforward task in the current assessment set; needing over five minutes likely indicates that a…

Checking your access…