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

SDE - 1

Ernst & Young (EY)
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

PREPARATION TIP:
Tip1- Don’t create panic in any case in the interview , as even if you are not selected you will learn a lot from your interview experience and perform well in the future. 
Tip2- Also I would recommend you Coding Ninjas as according to me it is a good platform to learn basic coding concepts and to practice coding.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: Write whatever you are sure about and have actually done that. 
Tip 2: CGPA plays a good role but not a complete role as it is just eligibility criteria for some companies. Have at least 1 or 2 good projects from which you know everything involved in the project.

Interview rounds

01
Round
Easy
Online Coding Test
Duration1 hour
Interview date3 Jan 2023
Coding problem2

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Occurrence of X in a Sorted Array

Moderate
26m average time
0/80
Asked in companies
DirectiSAP LabsAmazon

You have been given a sorted array/list of integers 'arr' of size 'n' and an integer 'x'.


Find the total number of occurrences of 'x' in the array/list.


Example:
Input: 'n' = 7, 'x' = 3
'arr' = [1, 1, 1, 2, 2, 3, 3]

Output: 2

Explanation: Total occurrences of '3' in the array 'arr' is 2.


Problem approach

s1- Count number of occurrences (or frequency) in a sorted array

s2- Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[]. 

s3- Examples:

Input: arr[] = {1, 1, 2, 2, 2, 2, 3,}, x = 2
Output: 4 
2 occurs 4 times in arr[]

Try solving now

2. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
QualcommUberAmazon

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

s1- My Approach
s2- Given an array and an integer K, find the maximum for each and every contiguous subarray of size k.

Examples :
Input: arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}, K = 3 
Output: 3 3 4 5 5 5 6

Explanation: 
Maximum of 1, 2, 3 is 3
Maximum of 2, 3, 1 is 3
Maximum of 3, 1, 4 is 4
Maximum of 1, 4, 5 is 5
Maximum of 4, 5, 2 is5 
Maximum of 5, 2, 3 is 5
Maximum of 2, 3, 6 is 6

Try solving now
02
Round
Medium
Video Call
Duration40 min
Interview date16 Nov 2022
Coding problem2

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Count subsequences

Moderate
30m average time
60% success
0/80
Asked in companies
OracleDell TechnologiesHCL Technologies

You have been given an integer array/list 'ARR' of size 'N'. Your task is to return the total number of those subsequences of the array in which all the elements are equal.

A subsequence of a given array is an array generated by deleting some elements of the given array with the order of elements in the subsequence remaining the same as the order of elements in the array.

Note :
As this value might be large, print it modulo 10^9 + 7
Problem approach

s1- For this question, I simply used some mathematics and considered the frequency of each element and their contribution to subsequences.
s2- Wrote its fully commented code with neat handwriting.

Try solving now

2. Edit Distance

Moderate
30m average time
70% success
0/80
Asked in companies
OYOGoldman SachsHCL Technologies

You are given two strings 'S' and 'T' of lengths 'N' and 'M' respectively. Find the "Edit Distance" between the strings.

Edit Distance of two strings is the minimum number of steps required to make one string equal to the other. In order to do so, you can perform the following three operations:

1. Delete a character
2. Replace a character with another one
3. Insert a character
Note:
Strings don't contain spaces in between.
Problem approach

s1- Firstly I gave the interviewer, a recursive solution then he asked me to reduce complexity as it was exponential of recursive solution so I gave him a top-down DP solution.

Try solving now
03
Round
Easy
Face to Face
Duration60 min
Interview date15 Dec 2022
Coding problem2

- Morning time
- Environment was good.
- No
- Interviewer was good

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

s1. You don't need to print anything, it has already been taken care of. Just implement the given function.

s2. You can return strings in any order.

Try solving now

2. Compress the String

Moderate
32m average time
60% success
0/80
Asked in companies
MicrosoftArcesiumAmazon

Write a program to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions.

Example:
If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
Note:
Consecutive count of every character in the input string is less than or equal to 9. You are not required to print anything. It has already been taken care of. Just implement the given function and return the compressed string.
Problem approach

s1- This can be solved using maps or by taking extra array(storing frequencies).

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
SDE - 1
3 rounds | 3 problems
Interviewed by Ernst & Young (EY)
2674 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Ernst & Young (EY)
1791 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Ernst & Young (EY)
1249 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Ernst & Young (EY)
1203 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2197 views
0 comments
0 upvotes