Infosys Off-campus On-site OA Experience

infosys logo
infosys
September 5, 2026 · 2 reads

Summary

I took part in Infosys off‑campus on‑site OA consisting of four problems; I solved two completely, one partially, and missed the 70% cutoff, so I did not qualify.

Full Experience

The onsite OA consisted of 4 problems. We have to solve those of "Wingspan" we can come back to submitted problem. It was explicitly mentioned in the portal itself that 70% was needed for cutoff before starting the assessment.

Problem 1:

The problem has a twisted wording it took me 20 minute to understand the problem, but approach was simple.

"Given a wheel and arc array where arc[0] and arc[n - 1] was attached. Now, the arcs may form some degree which may cover 360 degree or may not. We need to replace exactly one arc[i] with shim[i], if the degree made by arc + shim is less than 360 degree we check diff and multiply that by rate, the arc + shim may also exceed the 360 degree so here also we needed to multiply excess by rate, and we needed to minimize the cost among all possibilities"

Here we have to use prefix sum or net sum and no DP was used.

N <= 1e5

Problem 2:

I initially thought of using DP as the problem was to minimize the output based on arrangements.

"Given 2 stations and 2 array a and b. Now each index is called unit, now a station can process one unit at a time, now we can choose any arrangement of index or ordering of index. After that we will stay a[i] time at station 1 and we must stay b[i] time on station 2. Example: a[2] -> b[2] then a[4] -> b[4]

Now, we can erase exactly one b[i] and its contribution. " Here dp was not working, so i brute forced, generated all order of index. However in the question "Johnson's Rule" was mentioned. I did not able to relate it as I was unaware. So, it is just a greedy approach.

N <= 1e5

Problem 3:

This question explicitly mentioned Disjoint Set Union but the implementation was stack based.

"We have p level we have used DSU to find relative rank of each level, and in each level arrangement we find abs(maximum - minimum) level. and we need to find the sum of all possible level arrangements." After reading the problem I was not getting any hints or approach, but after seeing the examples, i found that we need to find sum(maximum - minimum) among all subarray. And this is normal Next Greater Element and Next Smaller Element. N <= 1e5

Problem 4:

You need specific DP optimization technique. However it is simple implementation based.

"You have an array and number of jumps K, when you jump from i to j (i < j) the cost is (a[i] - a[j]) * (a[i] - a[j]) + b[j]. You need to use atmost K jumps to reach n - 1 index with minimum cost. Array was sorted." The DP can be: dp[i][k] = min(dp[j][k - 1] + cost(j, i); j < i for implementation So it was O(N * N * K), to solve this you needed CHT DP optimization. K <= 100.

Experience:

The problem statement was not clear and the example of problem 2 was ambiguous.

I have solved: Problem 1: 12/12 test cases. Approach: Summation Problem 2: 0/12 test cases. Approach: Johnson's Rule Problem 3: 12/12 test cases. Approach: Stack Problem 4: 5/12 test cases. Approach: CHT DP

And my percentage is approx 60% so I have not qualified the cutoff.

This was for offcampus 2025-2026 drive. Prior to this their was virtual online assessment.

Interview Questions (4)

1.

Minimize Cost by Replacing One Arc with Shim

Data Structures & Algorithms

Given a wheel and an arc array where arc[0] and arc[n‑1] are attached. The arcs may together cover 360 degrees or not. We must replace exactly one arc[i] with shim[i]. If the total degree formed by arc + shim is less than 360°, we compute the difference and multiply by rate; if it exceeds 360°, we compute the excess and also multiply by rate. The goal is to minimize the total cost among all possible replacements. Constraints: N ≤ 1e5.

2.

Two‑Station Scheduling with One Removable B

Data Structures & Algorithms

We have two stations and two arrays a and b of length N. Each index represents a unit that must be processed first on station 1 for a[i] time, then on station 2 for b[i] time. We may order the units arbitrarily. Exactly one b[i] can be erased (its contribution removed). The objective is to minimise the total processing time. Constraints: N ≤ 1e5. The problem statement referenced “Johnson's Rule”.

3.

Sum of (Maximum‑Minimum) Over All Sub‑arrays Using DSU

Data Structures & Algorithms

We have p levels and use a Disjoint Set Union (DSU) to find the relative rank of each level. For each possible level arrangement we compute abs(maximum - minimum) for that arrangement and need to sum these values over all possible arrangements. After inspecting examples it reduces to calculating sum(maximum - minimum) for every sub‑array. Constraints: N ≤ 1e5.

4.

Min Cost Path with At Most K Jumps (CHT DP)

Data Structures & Algorithms

Given a sorted array a and an array b, you can jump from index i to a later index j (i < j). The jump cost is (a[i] - a[j])² + b[j]. Using at most K jumps you must reach the last index (n‑1) with minimum total cost. Constraints: K ≤ 100. A straightforward DP is dp[i][k] = min_{j < i}(dp[j][k‑1] + cost(j, i)), which is O(N²K) and needs convex hull trick (CHT) optimisation.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!