Mphasis pvt limited interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Mphasis pvt limited
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
It was a good experience as I was switching from Infosys(less package) to a bigger package. It require lot of consistency and hard-work as you need to be through with the topics (For me it was front-end so I have to study JavaScript and Reactjs along with redux , CSS and HTML)
Application story
I got a call for this from naukri.com. Make your resume and make sure you use all the keywords for a front-end development and it should contain projects related to your tech stack.
Why selected/rejected for the role?
Selected for this role. In fact, the interviewer was very happy with all my answers. Actually, I worked a lot on my development skills and communications skills as well and had real hand-on experience.
Preparation
Duration: 6 months
Topics: Data Structures, JavaScript, React, Redux, HTML, CSS, CSS- PreProcessors
Tip
Tip

Tip 1: Work on DS and algorithms.
Tip 2: Deep dive into JavaScript advanced concepts and try to understand how JavaScript behaves with code.
Tip 3: Be strong with any one framework( for me it was React.js) and make projects on it.

Application process
Where: Naukri
Eligibility: 2+ experience in Front-End Development
Resume Tip
Resume tip

Tip 1: Include Projects related to your tech stack
Tip 2: Try to tell your hands-on experience by telling your current company work or any internship and make sure you don't put false things on your resume that you cannot justify.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date5 Jan 2022
Coding problem4

total 30 questions you need to attempt in 90minutes , you can flag the questions if you have doubt and negative marking was there

1. Guess the Output

// Code 1:

function func1(){
 setTimeout(()=>{
   console.log(x);
   console.log(y);
 },3000);

 var x = 2;
 let y = 12;
}
func1();

// Code 2:

function func2(){
 for(var i = 0; i < 3; i++){
   setTimeout(()=> console.log(i),2000);
}
}
func2();

// Code 3:

(function(){
 setTimeout(()=> console.log(1),2000);
 console.log(2);
 setTimeout(()=> console.log(3),0);
 console.log(4);
})();

Problem approach

Code 1 - Outputs 2 and 12. Since, even though let variables are not hoisted, due to the async nature of javascript, the complete function code runs before the setTimeout function. Therefore, it has access to both x and y.
Code 2 - Outputs 3, three times since the variable declared with the var keyword does not have block scope. Also, inside the for loop, the variable i is incremented first and then checked.
Code 3 - Output in the following order:
2
4
3
1 // After two seconds

2. Output Question

var x = 23;

(function(){
 var x = 43;
 (function random(){
   x++;
   console.log(x);
   var x = 21;
 })();
})();

Problem approach

Output is NaN.

random() function has functional scope since x is declared and hoisted in the functional scope.

3. OOPs Question

Write the code for dynamically inserting new components.

Problem approach



inserting new components dynamically 

function addNode () { var newP = document. createElement("p"); 
var textNode = document.createTextNode(" This is other node"); 
newP.appendChild(textNode); document.getElementById("parent1").appendChild(newP); } 


firstP 
 

4. Count vowels, consonants, and spaces

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

Given a string, write a program to count the number of vowels, consonants, and spaces in that string.

EXAMPLE :
Input: ‘N’= 25, ‘s’ =”Take u forward is Awesome”
Output: 10 11 4
Problem approach

const findVowels = str => {
let count = 0
const vowels = ['a', 'e', 'i', 'o', 'u']
for(let char of str.toLowerCase()) {
if(vowels.includes(char)) {
count++
}
}
return count
}

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date20 Jan 2022
Coding problem2

It was mainly on frameworks and React coding and advanced concepts were tested in this round

1. React

Name a few techniques to optimize React app performance.

Problem approach

Using useMemo( ) -
It is a React hook that is used for caching CPU-Expensive functions.
Sometimes in a React app, a CPU-Expensive function gets called repeatedly due to re-renders of a component, which can lead to slow rendering.
useMemo( ) hook can be used to cache such functions. By using useMemo( ), the CPU-Expensive function gets called only when it is needed.
Using React.PureComponent -
It is a base component class that checks the state and props of a component to know whether the component should be updated.
Instead of using the simple React.Component, we can use React.PureComponent to reduce the re-renders of a component unnecessarily.
Maintaining State Colocation -
This is a process of moving the state as close to where you need it as possible.
Sometimes in React app, we have a lot of unnecessary states inside the parent component which makes the code less readable and harder to maintain. Not to forget, having many states inside a single component leads to unnecessary re-renders for the component.
It is better to shift states which are less valuable to the parent component, to a separate component.
Lazy Loading -
It is a technique used to reduce the load time of a React app. Lazy loading helps reduce the risk of web app performance to a minimum.

2. Redux

Do You need to keep all my states in Redux? Should I ever use react internal state?

Problem approach

It is up to the developer's decision, i.e., it is developer's job to determine what kinds of state make up your application, and where each piece of state should live. Some users prefer to keep every single piece of data in Redux, to maintain a fully serializable and controlled version of their application at all times. Others prefer to keep non-critical or UI state, such as “is this dropdown currently open”, inside a component's internal state.

Below are the thumb rules to determine what kind of data should be put into Redux

Do other parts of the application care about this data?
Do you need to be able to create further derived data based on this original data?
Is the same data being used to drive multiple components?
Is there value to you in being able to restore this state to a given point in time (ie, time travel debugging)?
Do you want to cache the data (i.e, use what's in state if it's already there instead of re-requesting it)?

03
Round
Easy
HR Round
Duration30minutes
Interview date31 Jan 2022
Coding problem1

It is a normal discussion with HR about location, package, Project roles, and about yourself.

1. Basic HR Questions

Tell me about a time when you experienced difficulty at work while working on a project.

Problem approach

Tip 1: Focus on describing a problem that was related to your work using the STAR approach.
Tip 2: Do not answer negatively or bad-mouth any supervisor or any company.
Tip 3:Focus on the learnings of the problem rather than dwelling too much on the damage.

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
Software Engineer
2 rounds | 4 problems
Interviewed by Mphasis pvt limited
2517 views
0 comments
0 upvotes
Software Engineer
2 rounds | 2 problems
Interviewed by Mphasis pvt limited
1742 views
0 comments
0 upvotes
Software Engineer
3 rounds | 3 problems
Interviewed by Mphasis pvt limited
2008 views
0 comments
0 upvotes
Software Engineer
3 rounds | 4 problems
Interviewed by Mphasis pvt limited
220 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7977 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes