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

Specialist Programmer

Infosys
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I had practiced Data Structures and algorithms which really helped me a lot in getting cleared Infosys coding round for SP role. I used to participate in the various competitive coding contest on codeforces, codechef and leetcode which helped me in solving problems in the given problem.
Application story
I applied in Infytq, coding contest organised by Infosys, There were 3 coding questions , medium to hard level , I was able to solve only 2 question full and one with just some test cases .Then I was shortlisted for interview after 1 months . Interview happened.
Why selected/rejected for the role?
I got rejected because I could not solve the coding problem which was given to me in interview. It required very good knowledge of DSA which I think i was lacking.
Preparation
Duration: 6 Months
Topics: Data Structures , Java , Python , ML , DBMs
Tip
Tip

Tip 1 : Firstly pic any coding language and learn all basic concepts
Tip 2 : Then start learning diff Data Structures and practise at least 50 questions on each data structure with learnt coding language.
Tip 3 : Also prepare DBMS , OS and OOPs concepts for placement preparation.

Application process
Where: Campus
Eligibility: 70%
Resume Tip
Resume tip

Tip 1 : Mention only skills which you really have 
Tip 2 : Clearly mention projects which you have done

Interview rounds

01
Round
Easy
Online Coding Test
Duration180 minutes
Interview date22 Jan 2023
Coding problem3

3 Medium to Hard DSA Coding Questions

1. Monster Game

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftInfosys

You just bought a game of monsters which consists of various levels consisting of monsters. Each monster has power ‘P’ associated with it. Each monster follows (‘P’ * ‘P’ + 1) % ‘M’ distinct monsters in the next level having values from 0 to [(‘P’ * ‘P’ + 1) % ‘M’] - 1 where ‘M’ is a modulo integer given to you. Find the total number of monsters in all levels you need to finish to clear the game.

Note :

In the first level, there is only one monster with power, ‘P’ = 2.
Try solving now

2. Count Subarrays

Easy
15m average time
85% success
0/40
Asked in companies
AdobeMicrosoftInfosys

You are given an array/list consisting of 0 and 1 only. Your task is to find the sum of the number of subarrays that contains only 1 and the number of subarrays that contains only 0.

An array 'C' is a subarray of array 'D' if 'C' can be obtained from 'D' by deletion of several elements from the beginning and several elements from the end. Example :

Let 'ARR' = [1,0,0] then the possible subarrays of 'ARR' will be: {1}, {0}, {0}, {1,0}, {0,0}, {1,0,0}.
Example
If the given array 'ARR' = [1,0,0,0,1,1,0,1]
Then the number of 1’s subarrays will be 5. [{1},{1},{1},{1,1},{1}]
And the number of 0’s subarrays will be 7. [{0},{0},{0},{0,0},{0,0},{0,0,0},{0}]
So our answer will be 5 + 7 = 12.
Try solving now

3. Minimum Path Sum

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

Ninjaland is a country in the shape of a 2-Dimensional grid 'GRID', with 'N' rows and 'M' columns. Each point in the grid has some cost associated with it.


Find a path from top left i.e. (0, 0) to the bottom right i.e. ('N' - 1, 'M' - 1) which minimizes the sum of the cost of all the numbers along the path. You need to tell the minimum sum of that path.


Note:
You can only move down or right at any point in time.
Problem approach

I was difficult question. I could not solve

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date18 Feb 2023
Coding problem4

Interview started with introduction and then he gave me 1 coding question it was graph question and then he asked me from my projects, questions from oops, computer network and DBMS.

1. Detect Cycle In A Directed Graph

Moderate
30m average time
75% success
0/80
Asked in companies
MicrosoftAdobeFlipkart

You are given a directed graph having ‘N’ nodes. A matrix ‘EDGES’ of size M x 2 is given which represents the ‘M’ edges such that there is an edge directed from node EDGES[i][0] to node EDGES[i][1].

Find whether the graph contains a cycle or not, return true if a cycle is present in the given directed graph else return false.

For Example :
In the following directed graph has a cycle i.e. B->C->E->D->B.

alt text

Note :
1. The cycle must contain at least two nodes.
2. It is guaranteed that the given graph has no self-loops in the graph.
3. The graph may or may not be connected.
4. Nodes are numbered from 1 to N.
5. Your solution will run on multiple test cases. If you are using global variables make sure to clear them.
Try solving now

2. Build Heap

Moderate
30m average time
70% success
0/80
Asked in companies
OYOSamsungSAP Labs

You are given an integer array with N elements. Your task is to build a max binary heap from the array.

A max-heap is a complete binary tree in which the value of each internal node is greater than or equal to the values of the children of that node.

Note :
You do not need to print anything, just return the vector representation of the heap such that the input array follows 0 - based indexing and :

The left child of the ith node is at (2 * i + 1)th index.

The right child of the ith node is at (2 * i + 2)th index.

Parent of the node present at ith index is at (i - 1) / 2 indexes.
Try solving now

3. Technical Questions

1. What was your role in this project?
2. How many members were there in your group?
 

Problem approach

prepare projects well , mostly questions are from there only

4. OOPS Question

Difference between Abstract class and interface.

Here's your problem of the day

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

Skill covered: Programming

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
company logo
Specialist Programmer
2 rounds | 6 problems
Interviewed by Infosys
2814 views
0 comments
0 upvotes
company logo
Specialist Programmer
2 rounds | 4 problems
Interviewed by Infosys
1122 views
0 comments
0 upvotes
company logo
Specialist Programmer
2 rounds | 2 problems
Interviewed by Infosys
907 views
0 comments
0 upvotes
company logo
Specialist Programmer
3 rounds | 8 problems
Interviewed by Infosys
1092 views
0 comments
0 upvotes