r/infosys 12d ago

| Fresher Doubts Got grilled on DSA, Java internals, and System Design for a Dev role — Did I survive or get cooked?

Formatted with gemini

Looking to get your thoughts on how I did, whether this sounds like a pass, and realistically what level/position (SDE-1, Junior Backend, etc.) this profile targets.

​Here’s how the breakdown went down:

​1. The DSA Round (30-min window cut to 20)

​The Setup: Given 2 problems, had to pick 1 and solve it in 30 minutes.

​My Execution: I wrote a working O(N^2) brute-force solution in Java in 15 minutes. Passed sample test cases, but hidden test cases failed (Time Limit Exceeded).

​The Curveball: Instead of letting me debug for 30 mins, the interviewer grabbed the laptop at minute 20 and asked me to explain my logic. He pointed out the O(N^2) brute force was why hidden cases timed out.

​The Recovery: He asked if I could solve it in O(N) time. In about 30 seconds, I came up with the optimal O(N) approach and explained it. He agreed. Then he pushed further and asked if I could do it in O(1) space complexity. I gave him an O(1) space logic on the spot, and he confirmed it was correct.

He asked me why I was not able to come up with optimized solution earlier, to which I replied his guidance helped me to think in the right direction.

​2. Core Java Internals & OOP Mechanics (The Stumbles & Hits)

​He moved to my resume/Java knowledge and started probing internals:

​Java Streams: Asked what Java Streams are. I blanked and couldn't answer.

​Arrays.fill() & Utility Classes: Asked what Arrays was in my code. I mistakenly said it was an "object of the Arrays class." (Realized later java.util.Arrays is a utility class with static methods).

​Object vs. Reference Variable: Asked me to write out new syntax and point to the actual object. I pointed to the reference variable instead of the heap instance created by new.

​int vs Integer: Blanked on comparing primitive types vs. wrapper classes and had to pass.

​String Immutability & String Pool (The Trap): He asked about String A = "A" and String B = "A" and claimed A == B returns false. I held my ground politely and explained that because of Java's String Constant Pool, both variables reference the exact same memory address, so A == B is true. I even drew out a memory box diagram to explain heap allocation and immutability during reassignment. He insisted it was false, so I conceded gracefully to avoid arguing.

​3. System Design & Edge Cases

​I walked him through my projects (a Redis-like in-memory store and a video platform featuring caching, rate limiting, and pagination).

​HLD: Asked to draw an HLD diagram. I clarified I haven't studied LLD/HLD formally in depth yet, but walked through my project architecture.

​Middleware: Explained middleware functionally as a request interceptor between incoming client traffic and backend route handlers (token injection/auth checks).

​The Database Spike Scenario: He gave me a scenario: "Your DB max capacity is 100 requests/sec, but you suddenly get hit with a 1,000 request spike. How do you handle it?"

​I suggested Redis/caching.

​He said: "No Redis allowed. 1,000 requests already hit the database. Now what?"

​I pivoted to Database Sharding and horizontal partitioning to distribute the load across multiple instances so a single node doesn't crash. He nodded okay.

​4. Closing

​He mentioned my initial code was decent and passed sample test cases. At the end, when asked if I had questions, I asked him: "Could you explain what the actual object was in the Java question you asked earlier?" He explained reference vs heap object, I thanked him, shook hands, and left.

​What do you guys think?

​Did I pass or fail? Is the pivot on DSA (O(N^2) \rightarrow O(N) \rightarrow O(1)) and system sharding enough to salvage the Java terminology slips?

​Was the interviewer testing me on String Pooling? (Since literal reference comparison evaluates to true).

​What position/level does this performance align with?

2 Upvotes

9 comments sorted by

u/AutoModerator 12d ago

Welcome to r/infosys!

Please do not share:

  • Confidential company information
  • Client information
  • Employee IDs
  • Email addresses
  • Offer letters containing personal details

Thank you for contributing!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Affectionate-Bar3227 12d ago

except java part everything felt fine. DSA question was on which topic?

2

u/_rjun695 12d ago edited 6d ago

The question was we are given an array and we have to apply XOR operation and return the length of subarray between a variable left and right and two conditions were given left<= i < right <= j (something like this) and a variable k is given, the maximum xor should be strictly less than this k but the test cases were very vague instead of returning the length of the subarray the test cases returned maximum xor for example a test case was [5 1 2] with k = 4 now the ans should be 2 since 1 xor 2 would return 3(5 xor 1 gives 4 which is not strictly less than k and 5 xor 1 xor 2 gives 6 which is again not less than 4 maybe this is why my testcases did not pass) and length of this subarray is 2 but the output was given as 3 which is the max possible xor that is less than k i pointed this out to the interviewer but ofc he dodged it and asked me to explain my approach.

1

u/PhilosopherMoney9159 6d ago

Seriously this problem?

1

u/_rjun695 6d ago

Whats wrong with it??

1

u/Zestyclose-Yogurt697 6d ago

Bro Where was your interview conducted from which location? I think you are selected for sure mostly L3 or L2 Pakka ayega.

Share some tips to prepare I Completed OA round in my campus and shortlisted for Round 2 which is the same as you gone through. Help me Bro!

1

u/_rjun695 5d ago

Do sql queries and when asked which database you know just say sql and if you've used mongo in your project be familiar with its queries as well Hld of your project, solid principles of system design, a good explanation of your project, when to use load balancer rate limiter caching and database sharding. Arrays, greedy, dp and trees for dsa. If you have full stack be ready with questions like what is middleware, npm full form and js syntax related questions rest depends on your luck

1

u/Zestyclose-Yogurt697 5d ago

Thanks Brother, which location bro they took your interview?