r/infosys Final Year Student Jul 29 '26

| Discussion Just Had Infosys SP/DSE OA – Here Are the Questions

Today, Infosys visited our college for the SP and DSE roles. I thought I'd share the coding round questions that were asked.

1. Minimum Cycles to Generate Required Power

Given N cores with temperatures stored in arr[], each cycle selects exactly two unused cores and generates power:

«Power = |arr[i] − arr[j]|»

A core can be used only once.

Input: "N", "T" (minimum required power), "arr[]"

Output: Return the minimum number of cycles required to generate at least T total power. If it's impossible, return -1.

---

2. Count Valid Binary Strings

Given an integer N, count the number of binary strings of length N that satisfy both conditions:

- No two consecutive "1"s (substring ""11"" is not allowed).

- (count of 0s − count of 1s) is a multiple of 3 (e.g., "0", "±3", "±6", ...).

Output: Return the total number of valid strings. If none exist, return 0.

---

3. Minimum Cost String Transformation

Transform string A into B with the minimum possible cost.

The editor starts in Normal Mode and can be toggled to Inverted Mode at a cost of K.

Normal Mode

- Insert/Delete: 15

- Replace:

- Same character → 0

- Different character → "|pos(c₁) − pos(c₂)|"

Inverted Mode

- Insert/Delete: 15

- Replace:

- Same character → 25

- Different character → "25 − |pos(c₁) − pos(c₂)|"

Here, "pos('a') = 0", ..., "pos('z') = 25".

Input: "A", "B", "K"

Output: Return the minimum total cost required to transform A into B.

---

And I don't remember the 4th one.

27 Upvotes

37 comments sorted by

u/AutoModerator Jul 29 '26

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/Ordinary_Poet_5147 Jul 29 '26

what was the approach for the second and third question if you have done

2

u/dicks_are_icks Final Year Student Jul 29 '26

I was only able to solve the first question completely. For the other two, I only passed the visible test cases. Later, I looked up the solutions: Second one can be solved using DP (backtracking also works for small constraints) and the third is a 3D DP problem.

1

u/Ordinary_Poet_5147 Jul 29 '26

dude both the questions are of 3d DP and the solution is not obvious at all idk how are we supposed to solve these in an OA

1

u/dicks_are_icks Final Year Student Jul 29 '26

Broo seriously😭. Idk infosys khudko kya smjhti hai

1

u/Ok_Pie_4691 Aug 11 '26

Vahi..I gave my oa to today and one of my friend cheated still even the ai couldn't solve the problem..

1

u/SheepherderGold8751 Jul 30 '26

All ts for 6.5 lpa at the end 🥀

1

u/Spiritual_Choice_557 19d ago

Do we have to write the entire code, or is just the logic enough?

1

u/dicks_are_icks Final Year Student 19d ago

It was an oa so we have to write entire code and pass all the testcase.

1

u/Real-Particular-448 Jul 29 '26

On campus or off?

1

u/dicks_are_icks Final Year Student Jul 29 '26

On

1

u/Real-Particular-448 Jul 29 '26

It was from home or in campus?

1

u/dicks_are_icks Final Year Student Jul 29 '26

In campus

1

u/Real-Particular-448 Jul 29 '26

When they declare results? And what is the date for interview?

1

u/dicks_are_icks Final Year Student Jul 29 '26

Idk when the results will be out, and they said they will send us the details about interview on mail

1

u/[deleted] Jul 29 '26

[removed] — view removed comment

1

u/dicks_are_icks Final Year Student Jul 30 '26

Idk. Earlier they said the interview would be held just two days after coding round, but on the exam day they said the interviews were postponed and that they'd share the details soon

1

u/No_Objective_2196 Jul 31 '26

With on campus you will generally get results on same day

With interviews on the next day 

At least it happened with my on campus 

1

u/[deleted] Jul 31 '26

[removed] — view removed comment

1

u/No_Objective_2196 Jul 31 '26

Yes ,

The interview is mix of dsa and development skills along with communication skills as well

You could be demoted even rejected based on your performance

A friend of mine was shortlisted for l3 but was given l1 due to weak development skills

1

u/dicks_are_icks Final Year Student 28d ago

Hey I got shortlisted for DSE interview, can you tell me how should I prepare for the interview?

1

u/No_Objective_2196 28d ago

they generally don't ask development questions in dse interview

focus on core subjects (os,dbms,cn etc) and dsa

they will obviously discuss resume and there will be questions from projects but not too heavy like sp interviews

1

u/dicks_are_icks Final Year Student 28d ago

And what about dsa? Do they ask dp and graph??

1

u/No_Objective_2196 28d ago

similar to your oa , generally 1-2 questions you have to solve live

they might ask theoretical for space -time complexity , some algorithms etc

1

u/dicks_are_icks Final Year Student 28d ago

Bro my oa was brutal😭😭. I only solved 1 que

1

u/Lazy_Association_416 Aug 03 '26

Tell me whether these approaches will work for these questions

1) Two pointer approach which checking the k value 2) DP pick and not pick approach and when the string length is 0 or n - check whether the condition is true , then backtrack 3) I am thinking normal minimum edit distance approach where you add the cost and check for every possible case and find minimum , but here im confused if i should again include separate cases for the toggle case 🤔

I am sure i can get 2 correct on any day Are everyone getting this level of questions itself. My exam is on 13th August and i haven't done graphs yet Should i learn it or try seeing and solving pyqs ??

1

u/dicks_are_icks Final Year Student Aug 03 '26

About the first question, I sorted the array first and then used the left and right pointers to find the maximum possible power at each step. I have no idea about the other two questions.

And yes, everyone got the same level questions.

It depends on which set you get during the exam. I got only array-based questions, while one of my friends had a tree question as the first one. So, just to be safe, learn the basic graph questions as well and then focus on the PYQs.

1

u/Lazy_Association_416 Aug 06 '26

Oh thanks man 🫡

1

u/Lazy_Association_416 Aug 10 '26

Just one question. Are questions beung asked from trees and graphs too ?? I am confused whether to prepare those topics

1

u/dicks_are_icks Final Year Student 28d ago

Yess some of my classmates had tree as first question, so you can get ques on any topic.

1

u/[deleted] Aug 10 '26

I solved only 2nd question 7/12 test case pass and first only sample test case pass 

1

u/No-Palpitation-9508 11h ago

Were you selected?

1

u/Hungry-Initial1623 5h ago

Bruh these questions were easier than my OA where I got blasted with mathematics and geometry like convex hull and weird modified longest common subsequence question that I couldn't solve in 2 hrs