Infosys Offline OA | ₹21LPA | Convex Hull Trick Over Multi-Dimensional DP asked(Nov 2026)
Anonymous User
401
Nov 26, 2026
For SP/DSE roles - most of the candidates are having to give Infosys OAs offline and they are asking such difficult DSA questions. This was their one of the recently asked questions -
You are given two arrays a and b of length N, where a is sorted in non-decreasing order, and an integer K.
You start at index 1 and must reach index N using at most K jumps.
A jump from index i to index j (i < j) costs (a[i] - a[j])² + b[j].
Find the minimum total cost required to reach index N.
Constraints: 1 ≤ N ≤ 10⁵, 1 ≤ K ≤ 100.
Comments (0)


