← Infosys questions
CodingEasyReported in a candidate post, Jul 2019

Longest Sequence Satisfying Custom Recurrence Relation

Filed under Infosys

Given an array of integers, find the longest sequence where each element X[i] = X[i-1] + X[i-2]. If multiple sequences have the same maximum length, return the one with the smallest sum of elements…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Infosys questions

Collected from public candidate posts and coding forums. Updated Nov 2026.