#40Agricultural Sensor Monitor
A smart farming system continuously collects numerical readings from field sensors. Each reading represents the measured value during a particular monitoring interval. The system needs to determine whether two different consecutive pairs of readings have the same combined value. Given an integer array fieldReadings, consider every pair of adjacent readings: fieldReadings[i] + fieldReadings[i + 1]
Return true if the same sum appears for two different starting positions. Otherwise, return false. The two pairs may overlap, but they must start at different indices.
Real-World Applications: Crop Condition Monitoring Irrigation Pattern Detection Field Sensor Anomaly Analysis
Examples
Example 1
Input: fieldReadings = [4,2,4]
Output: true
Explanation: Pairs: [4,2] → 6 [2,4] → 6 The same combined reading occurs at two different positions.
Example 2
Input: fieldReadings = [1,2,3,4,5]
Output: false
Explanation: Pair sums are: 3,5,7,9 No sum is repeated.
Example 3
Input: fieldReadings = [0,0,0]
Output: true
Explanation: Both adjacent pairs have sum 0.
Constraints
- 2 <= fieldReadings.length <= 1000
- -10^9 <= fieldReadings[i] <= 10^9
- Each pair contains exactly two consecutive readings.
- Two pairs are considered different when their starting indices differ.
- Overlapping pairs are allowed.
