Visa OA | SDE Intern | On-Campus (CodeSignal, 70 min)

VISA · Question · Posted Jun 2026

Problem 1 - Array Neighbour Sum Problem Statement You are given an integer array nums. Return the sum of all elements that are strictly greater than both of their immediate neighbours. Elements at index 0 and index n - 1 are never counted because they do not have two neighbours. Constraints Constraint Value Array Length 3 <= nums.length <= 100000 Element Value -1000000000 <= nums[i] <= 1000000000 Test Cases Input Output Explanation nums = [1,3,2,5,4] 8 nums[1] = 3 is ...

The full answer & interview discussion are available to premium members.

Log in Create a free account