← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Capital One’s online assessment includes an easy-level array problem titled "Site Visit Target". You are given an integer array visits representing the number of site visits recorded on successive days, and an integer target. Your task is to determine the earliest day (0-based index) on which the cumulative number of visits reaches or exceeds the target. If the running total never meets the target, return -1. If the target is 0, you should return 0 immediately because the required total is trivially satisfied before any visits are counted.