Infosys interview experience Real time questions & tips from candidates to crack your interview

Specialist Programmer

Infosys
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I focused on DSA from the second year of my BTech, which helped me crack the interview. I used to solve 2–3 problems daily and participated in weekly contests. I also completed my academic projects in the third and fourth years, which were in the domains of Machine Learning and Agentic AI. For this role, DSA is the key to cracking it.
Application story
Infosys came to our college and conducted a pre-placement talk. They mentioned that an assessment would be conducted within the next three months, after which the interview shortlist would be released.
Why selected/rejected for the role?
I performed well in the interview by solving 1 out of 2 DSA questions. The interviewer also asked questions about my projects and core subjects like OOPs and DBMS, which I answered well.
Preparation
Duration: 10 Months
Topics: Data Structures, OOPs, DBMS, OS, ML, Dynamic Programming
Tip
Tip

Tip 1: Practice DP more in DSA.

Tip 2: Be fully aware of your projects.

Tip 3: Stay confident during the interview.

Application process
Where: Campus
Eligibility: Above 7CGPA. (Salary Package: 11LPA)
Resume Tip
Resume tip

Tip 1: Make sure you mention what you know thoroughly.

Tip 2: Make it ATS-friendly.

Interview rounds

01
Round
Medium
Online Coding Test
Duration180 minutes
Interview date1 Jun 2025
Coding problem3

It was conducted during the daytime and had a duration of 3 hours.

1. Count All Subarrays With Given Sum

Moderate
15m average time
85% success
0/80
Asked in companies
IBMSAP LabsCultfit

You are given an integer array 'arr' of size 'N' and an integer 'K'.

Your task is to find the total number of subarrays of the given array whose sum of elements is equal to k.

A subarray is defined as a contiguous block of elements in the array.

Example:
Input: ‘N’ = 4, ‘arr’ = [3, 1, 2, 4], 'K' = 6

Output: 2

Explanation: The subarrays that sum up to '6' are: [3, 1, 2], and [2, 4].
Problem approach

Tip 1: Make sure you complete it on time.

Try solving now

2. Expanse Of Subsequences

Hard
45m average time
55% success
0/120
Asked in company
Apple

You are given an array/list ‘ARR’ consisting of ‘N’ positive integers.

For any sequence ‘S’, let the expanse of ‘S’ be the difference between the maximum and the minimum element of ‘S’.

Your task is to return the sum of the expanse of all non-empty subsequences of ‘ARR’. Return this sum in modulo 10^9 + 7.

Note :

Expanse of a sequence of length 1 is always 0.
Problem approach

Tip 1: Hard-level questions require much practice.

Try solving now

3. Binary Tree From Bracket

Easy
10m average time
90% success
0/40
Asked in companies
OracleIBM

You are given a string ‘str’ which consists of brackets and integers ∈ [1, 9]. Your task is to construct a binary tree from the given string and return the Pre-Order Traversal of it.

The rules are as follows

1. The first character of the string is guaranteed to be an integer which denotes the root element of the tree.

2. This is followed by zero, one or two pairs of parenthesis, which contains a child binary tree with the same structure.

3. The first parenthesis denotes the left child of the binary then the right child.
For Example
Let str= “1(2)(3)”

The tree will be:

img-2

The first element i.e 1 is the root node and the first bracket signifies the left child of the root node which has only 1 element i.e 2 and the second bracket signifies the right child of the root node that has only 1 node i.e 3 . Hence we have the binary tree as shown above.
Try solving now
02
Round
Medium
Face to Face
Duration120 minutes
Interview date1 Aug 2026
Coding problem2

It was at 10 AM in the morning.
The interviewer was quite good.

1. Ninja And The LCM

Easy
15m average time
86% success
0/40
Asked in companies
Arista NetworksD.E.ShawCarWale

Ninja has given two numbers ‘X’ and ‘Y’. He has to find the LCM of these two numbers.

LCM (Least Common Multiple) of two numbers is the smallest number that can be divisible by both numbers.

As you are his big brother. So help Ninja in calculating the LCM.

EXAMPLE:
Input: 'X' = 2,  ‘Y’=3

Output: "6"

As “6” is the smallest number that is divisible by both 2 and 3.
Problem approach

Tip 1: More focus on DP problems in DSA.

Try solving now

2. Maximum Score

Hard
0/120
Asked in companies
IntuitJio Platforms Limited

Ninja is playing a board game in which two lists of distinct numbers ‘A’ and ‘B’ arranged in a non-descending order are given. The game has certain rules and the player has to pick some numbers from the given list and the score is the sum of unique picked numbers. The rules are:

1.  Choose any list ‘A’ or ‘B’.
2.  Traverse from left to right.
3.  After picking a number, if the picked number is present in both the arrays, you are allowed to traverse to the other array.

You are given arrays,’A’ and ‘B’ of size ‘N’ and ‘M’ respectively. Your task is to find the maximum score Ninja can achieve.

Since the answer can be very large, print answer % (10^9 + 7).
For Example
If the given array are ‘A’ = [1,3,5,7,9] and  ‘B’ = [3,5,100]”.The maximum score can be achieved is 109[1+3+5+100].
Problem approach

Tip 1: Make sure you practice more for hard-level questions.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which data structure is used to implement a DFS?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
5027 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6697 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3720 views
0 comments
0 upvotes
Specialist Programmer
2 rounds | 11 problems
Interviewed by Infosys
7 views
0 comments
0 upvotes