Tekion Corp | Online Test Coding Questions + Solutions | 2022

Question · Posted Apr 2026

You are given an array A of size N and an integer X For each integer Ai ,find the value of the second next greater element by X to the right. Constraints 1 <= N <= 10^5 1<= X <= 10^9; Sample input 7 2 1 2 3 4 7 6 7 Output 4 7 6 6 -1 -1 -1

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

Log in Create a free account