Infosys Off-campus On-site OA 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.


