Longest Subsequence With a Fixed Index-Value Sum

Company: Visa

Difficulty: medium