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

Specialist Programmer

Infosys private limited
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Application story
I received this opportunity through InfyTQ. Out of 3 coding questions in OA, I was able to solve 2 completely and 1 partially. In the Technical Interview, I was asked questions related to Python, my projects, and DBMS. Unfortunately, I was rejected in the Interview round.
Why selected/rejected for the role?
I was not able to give rapid-fire answers and couldn’t solve the full coding question. I was only able to solve it partially.
Preparation
Duration: 6 months
Topics: DSA, OS, OOPS, DBMS, CN
Tip
Tip

Tip 1: Prepare DSA thoroughly; I personally recommend Coding Ninjas for interview preparation.
Tip 2: Be confident and relaxed during the interview.
Tip 3: Revise your projects well—understand how they work and their functionalities.

Application process
Where: Company Website
Eligibility: 7 CGPA, (Salary package: 6.5 LPA)
Resume Tip
Resume tip

Tip 1: Keep your resume concise (preferably one page) and list only the skills you are confident in.
Tip 2: Avoid adding false information to your resume.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration180 minutes
Interview date28 Jan 2022
Coding problem3

There were 3 Coding Questions, They had easy to hard difficulty.

1. Maximum XOR

Hard
10m average time
90% success
0/120
Asked in companies
Red HatErnst & Young (EY)InMobi

You are given two arrays of non-negative integers say ‘arr1’ and ‘arr2’. Your task is to find the maximum value of ( ‘A’ xor ‘B’ ) where ‘A’ and ‘B’ are any elements from ‘arr1’ and ‘arr2’ respectively and ‘xor’ represents the bitwise xor operation.

Problem approach

Simply iterate over all possible pairs and find the maximum possible xor value.

Try solving now

2. Maximum Product Subarray

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonMicrosoftSamsung

You are given an array “arr'' of integers. Your task is to find the contiguous subarray within the array which has the largest product of its elements. You have to report this maximum product.

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.

For e.g.- The non-empty subarrays of an array [1,2,3] will be- [1],[2],[3],[1,2],[2,3],[1,2,3]. 
For Example:
If arr = {-3,4,5}.
All the possible non-empty contiguous subarrays of “arr” are {-3}, {4}, {5}, {-3,4}, {4,5} and {-3,4,5}.
The product of these subarrays are -3, 4, 5, -12, 20 and -60 respectively.
The maximum product is 20. Hence, the answer is 20.
Follow Up:
Can you solve this in linear time and constant space complexity?
Problem approach

By using Dynamic Programming.

Try solving now

3. Maximum Depth Of A Binary Tree

Easy
15m average time
85% success
0/40
Asked in companies
FacebookTata Consultancy Services (TCS)Walmart

You are given the root node of a binary tree with N nodes, whose nodes have integer values. Your task is to find the maximum depth of the given Binary tree.

Depth of a binary tree is the same as its height. In simpler terms, you have to find the total number of nodes encountered while moving from the root node to the farthest leaf node, along the longest path of the binary tree.

Example:-

example

If we are given the above binary tree as input then moving from root node(5) to the farthest leaf node(50), the path formed will be [ 5->10->25->35->40->45->50 ]. The total number of nodes encountered is 7, therefore the maximum depth of the binary tree is 7.
Problem approach

By using DFS, I was able to solve.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date2 Feb 2022
Coding problem1

In the technical interview, the interviewer asked questions on Python, Java, projects, and DBMS. They asked rapid-fire, back-to-back theory questions. I was also not able to solve the coding question fully at that time, which I believe was the main reason for my rejection.

1. Number Of Pairs With Given Sum

Moderate
39m average time
60% success
0/80
Asked in companies
SAP LabsAmazonSamsung

You have been given an integer array/list(arr) and a number 'Sum'. Find and return the total number of pairs in the array/list which when added, results equal to the 'Sum'.

Note:
Given array/list can contain duplicate elements.

(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
Problem approach

I was not able to give optimal answer.

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

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
Specialist Programmer
2 rounds | 4 problems
Interviewed by Infosys private limited
925 views
0 comments
0 upvotes
Specialist Programmer
2 rounds | 3 problems
Interviewed by Infosys private limited
875 views
0 comments
0 upvotes
Specialist Programmer
2 rounds | 11 problems
Interviewed by Infosys private limited
1239 views
0 comments
0 upvotes
Specialist Programmer
2 rounds | 4 problems
Interviewed by Infosys private limited
131 views
0 comments
0 upvotes