Chandrayaan Signal Strength Recovery
Chandrayaan Signal Strength Recovery
MediumArrays0% accepted
ISRO's Chandrayaan-3 rover telemetry loses signal intermittently (-1 represents lost data). Reconstruct missing signal values using interpolation from adjacent valid readings for data continuity.
Approach
Given an array where -1 represents lost signal strength, replace each -1 with the average (rounded down) of its adjacent non-lost neighbors.
Input
7
100 -1 110 -1 120 115 100
Output
100 105 110 115 120 115 100
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards