Infosys On-Campus Interview Experience

Anonymous2 weeks ago

I appeared for the Infosys on-campus hiring process, which included an online assessment followed by a technical interview at the Infosys office.

Although I was shortlisted for the interview, I struggled during the final coding round.

Online Assessment (OA)

The assessment had four coding questions, out of which candidates had to solve any three. Different candidates received different sets with varying difficulty levels. I managed to solve one question completely and partially solve another.

Problem 1: Greedy Selection Within a Budget

Despite being named Buy and Sell Stocks II, the problem was unrelated to stock trading. We had to select high-value packets from an array while following an alternating even- and odd-index constraint without exceeding a fixed budget.

I sorted the array and used a greedy approach. I completed it in around 15 minutes, and all 12 private test cases passed.

Problem 2: Trapping Rainwater With Contaminated Pillars

This was similar to the standard rainwater-trapping problem, but some pillars were contaminated. Water touching these pillars could not be counted, so we had to calculate the total valid water collected.

My greedy approach passed only one test case. I then tried a segment tree, which passed a few more cases, but I couldn't find a completely correct solution.

Problem 3: Count Valid String Partitions

We were given a string, such as abcbba, and had to count the ways to partition it into contiguous substrings such that every substring contained the same number of distinct characters.

For example, a | b | c | b | b | a is valid because every substring contains one distinct character. However, abc | bba is invalid because the substrings contain three and two distinct characters, respectively.

The string length could reach (10^5), making brute force too expensive. My solution passed the public test cases but failed the hidden ones.

Problem 4: Minimum Cost to Split an Array

We were given an integer array and had to divide it into contiguous subarrays while minimizing the total partitioning cost.

The challenge was to choose the partition boundaries carefully, as a locally optimal choice might not produce the minimum overall cost. I couldn't figure out an efficient approach.

Despite my performance in the OA, I was shortlisted for the next interview stage. The exact role allocation between SP and DSE was not yet confirmed.
Similar Pattern:


Technical Interview at Infosys Indore

Around 60-70 candidates from different colleges were present, and my interview started later than scheduled.

Introduction and Project Discussion

The interviewer was friendly and started with my introduction, followed by questions about my projects, technologies, and application architecture.

I was asked how my domain-blocking application could handle around one million requests. I explained a caching-based approach to reduce repeated processing and improve performance.

The interviewer liked the project and suggested publishing it on the Play Store. I explained why that wasn't feasible for my application.

Low-Level Design and OOP

We discussed another project where I had followed a production-oriented architecture. The questions covered:

  • Factory Design Pattern

  • SOLID Principles

  • Basic Object-Oriented Programming concepts

The interviewer also asked whether I knew SQL, but no queries were asked.

Overall, the discussion was comfortable, and I felt confident explaining my projects and technical decisions.


Final Coding Round

After the technical discussion, the interviewer opened Wingspan and gave me two DSA questions. I had to solve at least one within 30 minutes.

The interviewer started attending to another candidate while I worked. Since multiple interviews were happening simultaneously in the same hall, the environment was somewhat distracting.

Both questions were within my preparation level, but I froze under pressure and couldn't solve either.

Problem 1: Minimum Flips to Make a Binary String Alternating

We were given a binary string, such as 10101010001. One operation allowed us to flip a bit from 0 to 1 or vice versa, but operations could not be performed on adjacent positions.

We had to find the minimum number of flips needed to make the string alternating, meaning every two adjacent characters must be different.

The key observation is that there are only two possible target patterns: 010101... and 101010.... We can compare the original string against both patterns and determine the minimum required flips while respecting the operation restriction.

I couldn't identify the solution during the interview.

Problem 2: Maximize the Gap Between Products

We were given an array divided into two groups based on the original indices:

  • One group contained elements at even indices.

  • The other contained elements at odd indices.

We had to maximize the difference between the maximum product of two elements from the first group and the minimum product of two elements from the second group.

The approach involved separating the groups, considering possible pairs, and carefully handling positive, negative, and zero values to determine the required products.

Again, I couldn't organize the cases properly under pressure.


Key Takeaways

  • Practise solving coding problems under strict time limits.

  • Focus on identifying patterns and explaining your reasoning before coding.

  • Revise OOP, SOLID principles, design patterns, and project architecture.

  • Prepare for scenario-based questions involving scalability and performance.

  • Learn when to abandon an unproductive approach and try another one.

  • Practise staying focused even in distracting environments.

Final Thoughts

I was disappointed because the project discussion went well, and both coding questions seemed manageable during preparation. However, I couldn't perform as expected when it mattered.

This experience taught me that knowing the concepts is not enough, applying them calmly under pressure is equally important.

Recommended Reads

Post

DSA daily challenge

i did another problem today is was easy (1)I tried using loop , (2)Using binary search , (3 )Using determinent formula , (4) later divisor method so finaly all

Post

am starting dsa and doing pattern printing questions can you guys please tell me where to practice or just do strivers sheet questions ??? am doing it

please reply

Interview Experience

MobiKwik SDE-3 Interview Experience | Java Developer |

MobiKwik SDE-3 interview process was a mix of problem-solving, system design, and practical coding. Here’s a breakdown of the rounds and what I learned from the

Success Stories

I Wasn’t From CS, But I Chose to Prepare Like One

I’m Mahima, a B.Tech ECE student who wanted to build a career in software development. My placement journey was a mix of learning, self doubt, consistency, and

Post

AI Is Finding Security Bugs Faster

Imagine a bug hiding inside a programming language used by millions of websites. Developers have been working with it for years, but the problem goes unnoticed.

Comments0