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
Preparation
Duration: 3 months
Topics: Recursion, Sorting and searching, Hashmap, Tree, Graph, Array and strings, stack and queue.
Tip
Tip

Tip1 : Do atleast two questions daily. 
Tip 2 : Do not follow multiple resource. Do single resource multiple time. 
Tip 3 : Try to do peer programming.

Application process
Where: Referral
Eligibility: 6 CGPA
Resume Tip
Resume tip

Tip 1 : Add limited skills in your resume. Add skills only you know very well. 
Tip 2 : Add your best projects in resume. Resume should not be greater than 01 page.

Interview rounds

01
Round
Hard
Online Coding Test
Duration180 mins
Interview date25 Oct 2021
Coding problem3

Two slots. 
(9-12) 
(1-4) 
Online with camera recording. 
You must have internet having at least 2Mbps speed. Do not use mobile phone internet.

1. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Wells FargoThought WorksAccenture

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

step 1: start

step 2: declare array and left, right, mid variable

step 3: perform merge function.
if left > right
return
mid= (left+right)/2
mergesort(array, left, mid)
mergesort(array, mid+1, right)
merge(array, left, mid, right)

step 4: Stop

Try solving now

2. 0 1 Knapsack

Moderate
0/80
Asked in companies
AmazonTwitterInnovaccer

A thief is robbing a store and can carry a maximum weight of ‘W’ into his knapsack. There are 'N' items available in the store and the weight and value of each item is known to the thief. Considering the constraints of the maximum weight that a knapsack can carry, you have to find the maximum profit that a thief can generate by stealing items.

Note: The thief is not allowed to break the items.

For example, N = 4, W = 10 and the weights and values of items are weights = [6, 1, 5, 3] and values = [3, 6, 1, 4]. Then the best way to fill the knapsack is to choose items with weight 6, 1 and 3. The total value of knapsack = 3 + 6 + 4 = 13.

Problem approach

In a DP[][] table let’s consider all the possible weights from ‘1’ to ‘W’ as the columns and weights that can be kept as rows. 
The state DP[i][j] will denote the maximum value of ‘j-weight’ considering all values from ‘1 to ith’. So if we consider ‘wi’ (weight in ‘ith’ row) we can fill it in all columns which have ‘weight values > wi’. Now two possibilities can take place: 
Fill ‘wi’ in the given column.
Do not fill ‘wi’ in the given column.
Now we have to take a maximum of these two possibilities, formally if we do not fill the ‘ith’ weight in the ‘jth’ column then the DP[i][j] state will be the same as DP[i-1][j] but if we fill the weight, DP[i][j] will be equal to the value of ‘wi’+ value of the column weighing ‘j-wi’ in the previous row. 
So we take the maximum of these two possibilities to fill the current state.

Try solving now

3. Puzzle

Do not remember exact question. It was some operation on bits. Most probably xor of. 03 numbers. 
 

Problem approach

Tip 1: Do not spend much time on one question
Tip 2: Read question carefully
Tip 3: Try to cover all test cases.

02
Round
Medium
Video Call
Duration60 mins
Interview date22 Nov 2021
Coding problem1

Interview duration was 01 hours. In interview they had some checklist. Duration divided like this. 
01 coding question (screen share) : 20 min
Oops concept: 10 min (pillars of oops) 
Sql: 05 min (keys and joins) 
Project: 10min. (Your's role) 
Core java: 10 min. (Multi threading) 
Previous experience: 05 min. ( intern experience)

1. Implementation: HashMap

Easy
30m average time
90% success
0/40
Asked in companies
CognizanteBayAmazon

Design a data structure that stores a mapping of a key to a given value and supports the following operations in constant time.

1. INSERT(key, value): Inserts an integer value to the data structure against a string type key if not already present. If already present, it updates the value of the key with the new one. This function will not return anything.

2. DELETE(key): Removes the key from the data structure if present. It doesn't return anything.

3. SEARCH(key): It searches for the key in the data structure. In case it is present, return true. Otherwise, return false.

4. GET(key): It returns the integer value stored against the given key. If the key is not present, return -1. 

5. GET_SIZE(): It returns an integer value denoting the size of the data structure. 

6. IS_EMPTY(): It returns a boolean value, denoting whether the data structure is empty or not. 
Note :
1. Key is always a string value.
2. Value can never be -1.
Operations Performed :
First(Denoted by integer value 1):  Insertion to the Data Structure. It is done in a pair of (key, value).

Second(Denoted by integer value 2):  Deletion of a key from the Data Structure.

Third(Denoted by integer value 3): Search a given key in the Data Structure.

Fourth(Denoted by integer value 4): Retrieve the value for a given key from the Data Structure.

Fifth(Denoted by integer value 5): Retrieve the size of the Data Structure.

Sixth(Denoted by integer value 6): Retrieve whether the Data Structure is empty or not.
Problem approach

Tip 1: Try to explain solution first to interviewer before writing anything

Tip 2: First write brute force approach

Tip 3: understand question carefully.

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
924 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
1238 views
0 comments
0 upvotes
Specialist Programmer
2 rounds | 4 problems
Interviewed by Infosys private limited
130 views
0 comments
0 upvotes