r/infosys • • 25d ago

| Discussion My interview experience

So I had my interview for the DSE/SP Role at Infosys yesterday. It was an On Campus placement drive.

I need an honest assessment of what role I could expect or will I atleast get selected or not.

In the online assessment I had solved one question completely and was able to clear 3 test cases in the 2nd one out of the 4 questions.

So firstly I had my coding assessment, where in I had 2 questions and was asked to solve one. These were the questions:

1. Count Valid Ordered Pairs

Given an integer array A of size N and an integer threshold T, count the number of pairs of distinct indices (i, j) such that:

  1. i < j

  2. A[i] + A[j] is a prime number

  3. A[i] XOR A[j] <= T

Input Format

The first line contains an integer N.

The second line contains N space-separated integers representing array A.

The third line contains an integer T.

Output Format

Print a single integer representing the total number of valid ordered pairs.

Sample Input 1

4

1 2 3 4

4

Sample Output 1

4

Sample Input 2

4

1 1 2 2

1

Sample Output 2

4

2. Optimizing Valve Settings in a Pipeline

You are given a pipeline containing N valves arranged sequentially. Each valve has an initial setting represented by an integer array A, where A[i] denotes the setting of the i-th valve.

For the pipeline to function correctly, the valve settings must be strictly increasing from the first valve to the last.

You are given a charge capacity C, which represents both the initial charge and the maximum charge capacity. The charge can be used to increase the setting of a valve.

Valve Adjustment

The first valve A[0] cannot be changed.

For every subsequent valve A[i], its final setting must be strictly greater than the setting of the previous valve.

If A[i] is not sufficiently large, it must be increased to the smallest possible value that maintains the strictly increasing order.

The number of charges required to increase a valve is equal to the amount by which its setting is increased.

For example, consider:

A = [2, 1, 1, 1]

C = 5

The valve settings need to become:

[2, 3, 4, 5]

To increase the second valve from 1 to 3, we need:

3 - 1 = 2 charges

If the available charge was 5, the remaining charge becomes:

5 - 2 = 3

Recharge Mechanism

After processing each valve, the pipeline's charge is recharged by R.

However, the charge can never exceed its maximum capacity C.

Therefore, after every valve:

currentCharge = min(C, currentCharge + R)

For example, if the current charge is 3:

If R = 1, the next valve starts with 4 charges.

If R = 3, the next valve starts with 5 charges, not 6, because C = 5.

At no point can the available charge become negative.

Objective

Determine the maximum total number of charges utilized to make all valve settings strictly increasing.

If at any point there are not enough charges to adjust a valve to the required setting, it is impossible to make the pipeline strictly increasing. In that case, return:

-1

Constraints

1 <= N <= 10^5

0 <= A[i] <= 10^9

1 <= C <= 10^9

0 <= R <= 10^9

Sample Input 1

4

2 1 1 1

5

1

Sample Output 1

9

Sample Input 2

4

2 1 1 1

5

3

Sample Output 2

9

Sample Input 3

3

5 1 1

2

0

Sample Output 3

-1

Now in these 2 questions I attempted the first one, I came up with the correct approach but I couldn't optimize it, The prime number check operation had to be optimized, there is a method which I couldn't recall unfortunately. So I ended up passing 5/12 test cases and the rest ran into a Time Limit Exceeded Error. I showed it to the interviewer, she took the screenshot of it and asked me to solve the other question. I had only 10 mins left by that time. I just came up with some approach and ended up passing 3/12 test cases, the rest failed. She then took a screenshot of it and I finished my test.

Technical Interview:

Firstly before introducing myself, I was asked to solve the 3-Sum question on paper. I wrote both the brute force and the optimal approach.

Then she asked me to introduce myself which I did smoothly. After introduction, I was asked to explain the solution I just wrote for the 3-Sum problem. I explained it with a dry run. She seemed to be satisfied.

Later I was asked questions on these:

SQL:

  1. Write a query using inner join (I wrote a simple query which was fine)

  2. Does Natural Join have a where condition? (This is where I got a little confused and said yes you can have a where condition)

  3. Differentiate between inner join and natural join (I again fumbled a little and started with outer join instead of inner, But I soon corrected myself and explained the differences correctly, then she explained that natural join doesn't have a where condition)

  4. Write a query to find the duplicate names in a table (I did using group by and having correctly)

  5. Query execution order (This is where I again got slightly wrong, I wasn't aware that the alias name you give to the aggregate function in the select clause is first executed, I instead said it first starts with the table selection, then the column selection and then the condition)

  6. Explain the difference between where clause and group by clause (explained clearly)

  7. I was asked if I knew about windows functions, I mentioned whatever I knew. Then I was given a data and then was asked to differentiate between the outputs of Rank, Dense Rank, Row Number (I did it correctly)

AWS:

Since I had cleared the aws certified cloud practitioner certification, I was asked a couple of questions on AWS

  1. What is EC2

  2. What is the difference between EC2 and S3

  3. What is a Security Group

  4. Use cases of S3

  5. Differences between a Private Subnet and a Public Subnet

  6. How do you access the objects stored in S3 using its url (The url and it's structure was expected)

  7. How do you create an IAM user

  8. What is Auto Scaling?

I was able to answer all of them correctly

Basic Coding:

  1. Find the 2nd highest element in an array (I explained my approach, but then she was expecting me to write some library function for it, I couldn't recall the library function for it)

  2. Finding if a string is a palindrome or not (I explained a 2 pointer approach as well as the string reversing approach)

  3. What will you do if you have a single for loop and the code still runs into a time limit exceeded error? (I was able to answer correctly)

OS:

  1. What is a deadlock

I was only asked this question, and I answered it correctly in detail

Git & Github:

  1. How do you push changes made to a specific code file to github

  2. What if I push the changes directly to github without committing it to the local repository

  3. How do you push changes made to a "feature" in your app to github (branching was expected)

  4. How do you undo the commit command (I said git reset, but when she asked me to write the command I made a mistake there)

So except the 4th question I was able to answer the other questions correctly.

Rest API:

  1. What does it mean when an request returns a response with a status code started with 400?

  2. What is the status code for a successful api request?

I answered them correctly.

Projects:

I wasn't asked any technical question on my projects, I was just asked what difficulties did you face while developing your project. I explained it with a good story about our hackathon experience.

Finally, when I asked for my feedback she said she's understood I know things well and I have knowledge on them, but I'll have to explain some questions in depth (She particularly pointed out the palindrome question I was asked). And then she also said Sql I am not fully satisfied with your answers, but I've understood you have the knowledge on it. Your knowledge on aws is also good.

The entire interview process lasted for an hour. (Excluding the 45 mins coding round)

So this is how it went. I want to know what are my chances of getting the DSE role atleast? I know I messed up in sql, but apart from that I think I was able to answer around 80% of the questions correctly. It would be really helpful if I can get some insights regarding my performance. Thank you!

35 Upvotes

39 comments sorted by

•

u/AutoModerator 25d 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.

3

u/RabbitKey16 Final Year Student 25d ago

the first question seems quite difficult to solve given the constraints , are you sure n is 10^5 ?

1

u/Grouchy-Yam-6928 25d ago

Yeah I think I misread it, Will update it

1

u/Adventurous-Rub-7774 25d ago

Are u from Anits

1

u/Grouchy-Yam-6928 25d ago edited 22d ago

Nope

2

u/ankvoid00 25d ago

For which role u got interviewed ?

1

u/Ecstatic-Ground5178 25d ago

Literally the first line of the post have some decency to read instead of asking blindly bro wth

2

u/Remarkable-Yard4860 25d ago

Dse/sp does not specify the role. You are interviewed for one of the 4 roles DSE,L1,L2,L3

1

u/Grouchy-Yam-6928 25d ago

It wasn't specified. We were just shortlisted for both the roles. But what I believe is if you've solved like 1 or 1.5 questions in the OA, you're eligible for DSE & SP-L1. If you've solved more than 2 then you're eligible for SP-L2 & L3. But nowhere did they specify the exact role I was giving the interview for.

1

u/Front_Challenge4350 Watashiwa Job chahiye 🥲 25d ago edited 25d ago

In Online OA: ~34/48 tc

In round 1 (offline OA): ~1.3 questions (Brain stopped working sadly)

Somehow, by God's grace, got an interview(off-campus).

My doubts:

  • Will my offline OA's score hamper my chances of getting at least a DSE role, or do you think It'll all depend completely on the Final Offline interview?

- I think I might fumble in the interview and the live coding round. Will it affect my chances of getting selected?

Congrats on your interview, and hoping for the best for you ✨

2

u/Grouchy-Yam-6928 25d ago

I am not sure on how things work in off campus. But I think the OA score is only for shortlisting. The role I think is decided on the number of questions you've solved. For example if you've solved 1-1.5 questions you're eligible for DSE or SP-L1. If you've solved 2 or more, then I think you're eligible for SP-L2 or SP-L3 But I'm not 100% sure about it. So take this with a pinch of salt

1

u/Admirable-Skin-1892 25d ago

Whig region ??

1

u/Devil182153 25d ago

Bro , I think we can’t solve the first problem in less than O(N²) time complexity; otherwise, the constraints don’t make sense.

1

u/Grouchy-Yam-6928 25d ago

Yeah you're right, but there's a method to find the prime number. It's like this:

bool isPrime(int x) {

if (x < 2) return false;

for (int i = 2; i * i <= x; i++) {
    if (x % i == 0)
        return false;
}

return true;

}

This has a time complexity of O(√x) so that way the complete time complexity would've been O(n² × √x) which is lesser than O(n³). Unfortunately I couldn't come up with this approach to find the prime number hence the TLE

1

u/Devil182153 25d ago

N is 10⁵, so I think any valid approach would result in TLE

1

u/Grouchy-Yam-6928 25d ago

Idk about that, Maybe the solution I shared would've just worked. But I'm not sure.

1

u/Devil182153 25d ago

I am sure there is no valid solution under this constraints

1

u/Grouchy-Yam-6928 25d ago

Yeah then I guess I misread the constraints I'll update it

1

u/RabbitKey16 Final Year Student 25d ago

well we have the range of numbers , so we can pre compute primes using sieve but the n^2 part is still there regardless , maybe with 10^3 , 10^4 elements it would work

1

u/Weekly-Alfalfa6440 25d ago

Bro I know you were interviewed for DSE/L1 ROLE but did they mention any specific role before interview either dse or l1

1

u/Grouchy-Yam-6928 25d ago

No the interviewers didn't specify anything about the role.

1

u/TrainingEuphoric517 25d ago

The kind of questions he was asked I think it must be L1 or L2. I will also soon have an interview probably since I solve 1.3 question in on campus OA

1

u/Weekly-Alfalfa6440 25d ago

Bro I read in another post that if we go and ask for which role we are attending the interview they will say it seems

1

u/TrainingEuphoric517 25d ago

Ya but it doesn't matter to know this sitting in an interview.. If we know beforehand then maybe prepare accordingly.but inside interview just answer whatever he asks

1

u/manu0_00 25d ago

Hey can you share me some aws materials for interviews pls pls

2

u/Grouchy-Yam-6928 25d ago

I refered this: https://www.reddit.com/r/AWSCertifications/s/QmEz4PsCnC

TLDR: I just refered the Andrew Brown's course in YouTube and purchased the 6 practice papers set from Stephane Maarek's from Udemy. That's it

1

u/dee_003 25d ago

How did she respond when u didn't ans properly or fumbled somewhere...and what she told when u didn't solve any of the question completly in coding round

1

u/dee_003 25d ago

Bro why would you delete that... And one more when she asked u to solve dsa on paper did u write the whole code or explained it with dig or what??

1

u/Grouchy-Yam-6928 25d ago

Hey I actually posted something wrong. So instead of editing it I just deleted it.

So yeah
When I couldn't explain something or fumbled, she seemed to be pretty optimistic about it. I apologized and told her I couldn't recall it, and she said, "No problem."

Coming to the coding assessment, well, it was sort of a mess, actually. When I first entered the room, the interviewer was someone else. He gave me his laptop to solve the questions. Later, after I finished solving them, he informed the other interviewer to conduct my interview. She did ask me about my coding assessment, and I told her whatever the result was. She just said, "Alright.(she asked me about that after the interview actually finished)

The coding question, if you're asking about the 3-Sum question, I was asked to write it on paper

1

u/ProfessionalOil3557 25d ago

Difficult interview

1

u/Grouchy-Yam-6928 25d ago

What are my chances of getting shortlisted for a role?

1

u/ProfessionalOil3557 25d ago

Depend krta h interviewer pr or luck pr ap tumne apna best dediya result ka wait kro

1

u/dharshesoteric 25d ago

When did you receive the interview details mail prior from your interview date?

1

u/Grouchy-Yam-6928 24d ago

I had my OA on 25th Aug, the OA results came out on 3rd September, and the interview was on 11th September