Ernst & Young (EY) interview experience Real time questions & tips from candidates to crack your interview

Senior Software Developer

Ernst & Young (EY)
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Java 8 features, Data Structure and Algorithms, SQL queries, OOPs, linked List, AWS(at least 2 service), Spring boot, messaging Queue.
Tip
Tip

Tip 1 : Revise all the basic/top algos and Dsa questions atleast you should solve 200-250questions
Tip 2 : Should be familiar with java8/11 features like stream function or lambda function.
Tip 3 : In sql you must know joints and how to use them.

Application process
Where: Naukri
Eligibility: No
Resume Tip
Resume tip

Tip 1 : Highlight your skill and discuss same during interview
Tip 2 : Do not put false things on resume
Tip 3 : Resume should be 1 page and with good spaces so that interviewer can easily go through.

Interview rounds

01
Round
Medium
Online Coding Test
Duration110 mins
Interview date3 Mar 2022
Coding problem2

You have 24 hrs to attempt the test, so per your flexibility you can try. Timing was sufficient as per question level, Question was described so well and easily understandable.

1. Sort Array

Easy
15m average time
80% success
0/40
Asked in companies
AdobeIntuitErnst & Young (EY)

You are given ‘N’ distinct integers in the form of an array ‘ARR’. You need to find whether it is possible to sort the given array by choosing a continuous subarray and reversing that subarray. You have to return “true” if it is possible to sort the array after reversing the subarray. Otherwise, return “false”.

For example:
Let ‘ARR’ be: [3, 2, 1]
We can pick the whole array as a subarray and reverse it to get the sorted array [1, 2, 3].
Try solving now

2. Java cloning abstract objects

Image Editors: Cloning ShapeS

Most image editors can retain the properties of a drawn shape, which makes the copy-paste operations easier. In, this challenge, implement the Shape class per the following constructor and methods:
• The constructor Shape(String type, String color).
• The method String getType to return the shape type.
• The method void setType(String type) to update the Shape type.
• The method String getColor( to return the shape color.
• The method void setColor(String color) to update the Shape color.
• The method Shape cloneShape() to return the clone of the shape.
The locked stub code in the editor validates the correctness of the Shape class implementation by performing the following operations on the shapes initially drawn on the image editor.
• CS shapeld. This operation creates the clone of the Shape.
• UT shapeld shapeNewType: This operation updates the shape type.
• UC shapeld shapeNewColor. This operation updates the shape color.
After performing all the operations, the locked stub code prints the type and color of each shape.
Constraints
• 1 ≤ numberOfShapes = 50
• 1 ≤ numberOfOperations ≤ 500

Input Format For Custom Testing

The first line contains the value of
numberOfShapes, the total number of shapes initially drawn in the image editor.
Each of the next numberOfShapes lines contains two space-separated strings, the shape's type and color.
The next line contains the value of numberOfOperations, the total number of operations performed on the drawn shapes.
Each of the next numberOfOperations lines contains one of the three operations listed above.

STDIN
Function
3
number0fShapes =
3
Circle Red
>
color = 'Red'
type = 'circle',
Square Blue
color = 'Blue'
type = "Square',
Circle Yellow
color = 'Yellow'
type = 'Circle',
6
number0fOperations
= 6
CS 1
)
operation = clone
shape ID 1
UT 1 Square
operation = update
shape ID 1 to 'Square'

Sample Output 0
Square Yellow
Square Blue
Circle Green
Circle Red
Circle Red
Circle Red

Problem approach

public class Solution {

private static final Scanner INPUT_ READER = new Scanner (System.in);

pubtic static void main(Stringl args) I
List‹Shape> shapes = new ArrayList‹>0:

int numberOfShapes = Integer.parseInt (INPUT_READER.nextLine ()) ;
while (numberOfShapes-- > 0) {
stringli shape = INPUT_READER. nextLine() .split (" ");
shapes. add (new Shape (shape [0], shape [1])) ;

int numberOfOperations = Integer.parseInt (INPUT_READER. nextLine ()) ;
while (numberOfOperations=- > 0) {
String[] operation = INPUT_READER.nextLine() •split(" ");
Shape shape = shapes. get (Integer.parseInt (operation [11) - 1);

if (operation[0].equals ("CS")) {
Shape clonedShape = shape.cloneShape () ;

if (clonedShape == shape) {
shapes.add (new Shape ("Bad-type", "No-color"));
]shapes. add (clonedShape) ;
}else if (operation [01 ,equals ("UT")) {
shape.setType(operation [21);
} else if (operation[0].equals ("UC")) {
shape.setColor (operation [2]);
}

02
Round
Medium
Video Call
Duration60 minutes
Interview date22 Mar 2022
Coding problem1

Interview starts with introduction then interviewer asked me about OOPs concept and java 8 questions then he gave me to solve dsa question, while discussion over Dsa question we moved to spring boot where he asked me about basic tags and rest controller then in next steps he checked my knowledge about messaging queue and in last we had a good discussion about sql

1. Balanced parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
SalesforceAmazonMicrosoft

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

Declare a character stack (say temp).
Now traverse the string exp. 
If the current character is a starting bracket ( ‘(‘ or ‘{‘ or ‘[‘ ) then push it to stack.
If the current character is a closing bracket ( ‘)’ or ‘}’ or ‘]’ ) then pop from stack and if the popped character is the matching starting bracket then fine.
Else brackets are Not Balanced.
After complete traversal, if there is some starting bracket left in stack then Not balanced, else Balanced.

Try solving now
03
Round
Medium
Video Call
Duration30 minutes
Interview date7 Apr 2022
Coding problem1

This was easy then the previous round i was asked about java 8 questions then we had discussion over springboot and oops concept and in end he asked me some managerial questions.

1. Puzzle Question

Consider following Java program:

class func {
public static void main(String args[])
{
System.out.println("Hello World");
}
}
Hello World
Explanation:
1)public: It is an access specifier which allows the JVM(Java Virtual Machine) to access the main method from anywhere.
2)static: static keyword allows the JVM to access the main method without any instance(object).
3)void: It specifies that the main method doesn’t return anything.
4)main: name of the method(function) configured in JVM.
5)String args[]: Command line arguments.

Now, if we replace ‘public’ with ‘private’ in “public static void main”, the above code becomes:

class func {
private static void main(String args[])
{
System.out.println("Hello World");
}
}
Explanation:
The above code will be compiled successfully, but will throw a runtime error as follows:

Error: Main method not found in class func, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must be defined.

04
Round
Easy
Telephonic
Duration45 minutes
Interview date20 Apr 2022
Coding problem1

This was client round and it was kind of discussion over skills and had discussion about the oops, java 8, exceptional handling, springboot, AWS quicksight and Sql.

1. Chocolate Problem

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

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Problem approach

Follow the steps mentioned below to implement the approach:

Initially sort the given array. And declare a variable to store the minimum difference, and initialize it to INT_MAX. Let the variable be min_diff.
Find the subarray of size m such that the difference between the last (maximum in case of sorted) and first (minimum in case of sorted) elements of the subarray is minimum.
We will run a loop from 0 to (n-m), where n is the size of the given array and m is the size of the subarray.
We will calculate the maximum difference with the subarray and store it in diff = arr[highest index] – arr[lowest index]
Whenever we get a diff less than the min_diff, we will update the min_diff with diff.

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

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

Choose another skill to practice
Similar interview experiences
company logo
Senior Software Engineer
3 rounds | 20 problems
Interviewed by Ernst & Young (EY)
3748 views
0 comments
0 upvotes
company logo
Associate Technology
3 rounds | 3 problems
Interviewed by Ernst & Young (EY)
2209 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Ernst & Young (EY)
2595 views
0 comments
0 upvotes
company logo
Technology Consultant
4 rounds | 3 problems
Interviewed by Ernst & Young (EY)
2312 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Developer
3 rounds | 3 problems
Interviewed by BNY Mellon
1393 views
0 comments
0 upvotes