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

Power Programmer

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

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: OOPS, DSA, System Design, Aptitude, Java
Tip
Tip

Tip 1 : Learn Java 
Tip 2 : Practice tough DSA questions
 

Application process
Where: Other
Eligibility: No backlogs
Resume Tip
Resume tip

Tip 1 : Have a clean crisp resume
Tip 2 : Write your skills and don't lie

Interview rounds

01
Round
Hard
Online Coding Test
Duration180 minutes
Interview date7 May 2021
Coding problem3

Round 1 is an advanced test that will assess your programming and other technical skills.
• It comprises three programming-based questions of varying difficulty levels to be answered within
three hours. Each question will have a different weightage of marks.
• You will get an option to choose from the list of common programming languages and submit your
solution.
• All submissions for Round 1 shall be evaluated by the judging panel on the following parameters:
− Number of test cases that the code passes and code efficiency
− Marks are assigned to the questions based on the difficulty levels and the solutions will be
evaluated accordingly
− Plagiarism is not acceptable and there shall be negative marking for plagiarism.

1. Digits Decoding

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAdobeOYO

A few days back, Ninja encountered a string containing characters from ‘A’ to ‘Z’ which indicated a secret message. For security purposes he encoded each character of the string to its numeric value, that is, A = 1, B = 2, C = 3, till Z = 26 and combined them as a single sequence (SEQ) of digits of length N. Let's say the message was "LA", Ninja encoded it as 121 for L=12 and A=1.

Today, when he read the encoded secret message, he realised that he was not able to decode the original string. So, the Ninja is wondering in how many ways he can decode the numeric sequence to some valid string.

A valid string is a string with characters from A to Z and no other characters.

Example:
Let the encoded sequence be 121,

The first way to decode 121 is:
1 = A
2 = B
1 = A
Thus, the decoded string will be ABA.

The second way to decode 121 is:
12 = L
1 = A
Thus, the decoded string will be LA.

The third way to decode 121 is:
1 = A
21 = U
Thus, the decoded string will be AU.

So, there will be 3 ways to decode the sequence 121 i.e. [(ABA), (LA), (AU)].
Note:
The input sequence will always have at least 1 possible way to decode.    

As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up:
Can you solve this using constant extra space?
Try solving now

2. Check Subset

Easy
18m average time
90% success
0/40
Asked in companies
QualcommAmazonMedia.net

You are given two integer arrays ARR1 and ARR2 of length N and M respectively. You have to return true if ARR2 is a subset of ARR1, otherwise, return false.

For Example:

If the given arrays are [1, 2, 3] and [1, 2] then you need to return true as ARR2 is a subset of ARR1, but if the given arrays are [1, 2, 3] and [1, 2, 2] then you need to return false since ARR2 is not a subset of ARR1.
Problem approach

A pattern can be observed here

Try solving now

3. Puzzle Question

There is a problem set of N problems. It is given that you have A easy problems, B medium problems and C hard problems.
It is given that any valid problemset to be used in the quiz should meet the conditions
given below:
•No two problems with the same difficulty should be adjacent in the final problemset
.There is at least one easy and one hard problem in the final problemset. 
• Number of medium problems is strictly greater than easy problems in the final
problemset 
• Number of medium problems is strictly greater than hard problems in the final problemset.
Your task is count the total number of valid problemset that can be created from the problems provided. Since this number is large you need to print the modulo 10^9 +7.
Note: Two problemset's are considered different if there is some index i where the difficulty of problems in these two sets are different.

02
Round
Easy
Video Call
Duration50 minutes
Interview date17 Jul 2021
Coding problem1

1. Count Words

Easy
0/40

For a given input string(str), find and return the total number of words present in it.

It is assumed that two words will have only a single space in between. Also, there wouldn't be any leading and trailing spaces in the given input string.

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
Power Programmer
1 rounds | 3 problems
Interviewed by Infosys private limited
1162 views
1 comments
0 upvotes
Power Programmer
2 rounds | 2 problems
Interviewed by Infosys private limited
3421 views
1 comments
0 upvotes
Power Programmer
4 rounds | 5 problems
Interviewed by Infosys private limited
1285 views
0 comments
0 upvotes
Power Programmer
1 rounds | 1 problems
Interviewed by Infosys private limited
559 views
0 comments
0 upvotes