Infosys Off-campus On-site OA Experience
- Posted
- 5 Sept 2026
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.
How it went
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.
Questions asked (4)
- 01
Minimize Cost by Replacing One Arc with Shim
Data Structures & Algorithms
Given a wheel and an
arcarray wherearc[0]andarc[n‑1]are attached. The arcs may together cover 360 degrees or not. We must replace exactly onearc[i]withshim[i]. If the total degree formed byarc + shimis less than 360°, we compute the difference and multiply byrate; if it exceeds 360°, we compute the excess and also multiply byrate. The goal is to minimize the total cost among all possible replacements. Constraints:N ≤ 1e5. - 02
Two‑Station Scheduling with One Removable B
Data Structures & Algorithms
We have two stations and two arrays
aandbof length N. Each index represents a unit that must be processed first on station 1 fora[i]time, then on station 2 forb[i]time. We may order the units arbitrarily. Exactly oneb[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”. - 03
Sum of (Maximum‑Minimum) Over All Sub‑arrays Using DSU
Data Structures & Algorithms
We have
plevels and use a Disjoint Set Union (DSU) to find the relative rank of each level. For each possible level arrangement we computeabs(maximum - minimum)for that arrangement and need to sum these values over all possible arrangements. After inspecting examples it reduces to calculatingsum(maximum - minimum)for every sub‑array. Constraints:N ≤ 1e5. - 04
Min Cost Path with At Most K Jumps (CHT DP)
Data Structures & Algorithms
Given a sorted array
aand an arrayb, you can jump from indexito a later indexj(i < j). The jump cost is(a[i] - a[j])² + b[j]. Using at mostKjumps you must reach the last index (n‑1) with minimum total cost. Constraints:K ≤ 100. A straightforward DP isdp[i][k] = min_{j < i}(dp[j][k‑1] + cost(j, i)), which is O(N²K) and needs convex hull trick (CHT) optimisation.