BNY Mellon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

BNY Mellon
upvote
share-icon
2 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: OOPS, System Design, Algorithms, Data Structures, DBMS
Tip
Tip

Tip 1 : Prepare System Design
Tip 2 : Practice DSA Questions properly
Tip 3 : Practice OOPS and DBMS Concepts

Application process
Where: Referral
Eligibility: 7+ CGPA
Resume Tip
Resume tip

Tip 1 : Your Resume should consist mainly of skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date9 Apr 2022
Coding problem4

There were four coding questions in the online Assessment to be solved in the 90 minutes

1. K'th Special Number in Range

Ninja
24m average time
0/200
Asked in companies
ShareChatIntuitBNY Mellon

Ninja wants to practice martial arts in order to master it but he has a pending school assignment and wants your help to solve it.

You are given two integers ‘L’ and ‘R’ denoting the range of integers [L, R]. A special number is a number that has (101)2 subarray in its binary representation. You have a simple task, you need to find the ‘K’th’ special number that lies in the given range, print -1 if it is not possible.

For Example :
If L = 5 and R = 7, and you need to find the 1’st special number lying in the range [5, 7]

The answer for this is equal to 5, as 5 is the first special number lying in the given range, it is a special number because it has a subarray 101 in its binary representation.
Problem approach

Initialize a variable left for storing the total numbers smaller than or equal to N whose sum of digits is divisible by M.
Find the midpoint of the lower and the upper limit and then find the numbers smaller than or equal midpoint whose sum of digits is divisible by M using the above dp function. Let it be right.
If left + K is equals to right then, update the answer as mid and set the upper limit as midpoint – 1.
Otherwise, if left + K is smaller than right, set the upper limit as midpoint-1.
If left + K is greater than right, set the lower limit as midpoint+1.
Repeat the above steps, while the lower limit is smaller than or equal to the upper limit.

Try solving now

2. Duplicate In Array

Easy
15m average time
85% success
0/40
Asked in companies
WalmartBNY MellonMorgan Stanley

You are given an array ‘ARR’ of size ‘N’ containing each number between 1 and ‘N’ - 1 at least once. There is a single integer value that is present in the array twice. Your task is to find the duplicate integer value present in the array.

For example:

Consider ARR = [1, 2, 3, 4, 4], the duplicate integer value present in the array is 4. Hence, the answer is 4 in this case.
Note :
A duplicate number is always present in the given array.
Problem approach

Used hashmap and stored frequency after that iterated the hashmap if frequency greater than one increase counter. return the counter

Try solving now

3. Minimize The Maximum

Easy
15m average time
85% success
0/40
Asked in companies
Paytm (One97 Communications Limited)Goldman SachsInfosys

You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the maximum element and the minimum element after modifications.

Problem approach

Sort the array 
Try to make each height of the tower maximum by decreasing the height of all the towers to the right by k and increasing all the height of the towers to the left by k. Check whether the current index tower has the maximum height or not by comparing it with a[n]-k. If the tower’s height is greater than the a[n]-k then it’s the tallest tower available.
Similarly, find the shortest tower and minimize the difference between these two towers.

Try solving now

4. Non-Decreasing Array

Moderate
35m average time
65% success
0/80
Asked in companies
MicrosoftAmerican ExpressOptum

You have been given an integer array/list 'ARR' of size 'N'. Write a solution to check if it could become non-decreasing by modifying at most 1 element.

We define an array as non-decreasing, if ARR[i] <= ARR[i + 1] holds for every i (0-based) such that (0 <= i <= N - 2).

Problem approach

When nums[i-1] > nums[i] for some i, you will prefer to change nums[i-1]'s value, since a larger nums[i] will give you more risks that you get inversion errors after position i. But, if you also find nums[i-2] > nums[i], then you have to change nums[i]'s value instead, or else you need to change both of nums[i-2]'s and nums[i-1]'s values.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date13 Apr 2022
Coding problem4

This round takes place as a Code-Pair round. The interviewer was very friendly and helpful. Firstly, he asked me to introduce myself and a small discussion on my Resume. He asked three programming questions each of easy, medium, and tough levels

1. Find Duplicates In Array

Easy
15m average time
90% success
0/40
Asked in companies
InfosysAckoIBM

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all such duplicate elements.

Note:
1. All the elements are in the range 0 to N - 1.
2. The elements may not be in sorted order.
3. You can return the duplicate elements in any order.
4. If there are no duplicates present then return an empty array.
Problem approach

Since the range of elements in the array is known, hence we could use this sorting technique to improvise the time complexity. 
The idea is to initialize another array(say count[]) with the same size N and initialize all the elements as 0. Then count the occurrences of each element of the array and update the count in the count[]. Print all the element whose count is greater than 1.

Try solving now

2. Permutations of a String

Moderate
15m average time
85% success
0/80
Asked in companies
GoogleMakeMyTripDisney + Hotstar

You are given a string 'STR' consisting of lowercase English letters. Your task is to return all permutations of the given string in lexicographically increasing order.

String A is lexicographically less than string B, if either A is a prefix of B (and A ≠ B), or there exists such i (1 <= i <= min(|A|, |B|)), that A[i] < B[i], and for any j (1 <= j < i) A[i] = B[i]. Here |A| denotes the length of the string A.

For example :

If the string is “bca”, then its permutations in lexicographically increasing order are { “abc”, “acb”, “bac”, “bca”, “cab”, “cba” }.
Note:
Given string contains unique characters.
Problem approach

Create a function permute() with parameters as input string, starting index of the string, ending index of the string
Call this function with values input string, 0, size of string – 1
In this function, if the value of L and R is the same then print the same string
Else run a for loop from L to R and swap the current element in the for loop with the inputString[L]
Then again call this same function by increasing the value of L by 1
After that again swap the previously swapped values to initiate backtracking

Try solving now

3. Swap Number Without Temporary Variable

Easy
15m average time
85% success
0/40
Asked in companies
MicrosoftOracleCisco

Given two variables ‘X’ and ‘Y’. Your task is to swap the number without using a temporary variable or third variable.

Swap means the value of ‘X’ and ‘Y’ must be interchanged. Take an example ‘X’ is 10 and ‘Y’ is 20 so your function must return ‘X’ as a 20 and ‘Y’ as a 10.

Problem approach

The bitwise XOR operator can be used to swap two variables. The XOR of two numbers x and y returns a number that has all the bits as 1 wherever bits of x and y differ

Try solving now

4. Puzzle

You begin in the top left corner of a 6×6 grid, and your objective is to move to the bottom right corner. There are just two directions you can move: right or down. Both diagonal and backward movements are prohibited. How many different ways are there to get from start to finish?

Problem approach

Tip 1 : Practice previously asked questions.
Tip 2 : Speak your approach loud as the interviewer may help.

Here's your problem of the day

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

Skill covered: Programming

What is the output of print(type("Python"))?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
5617 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 | 6 problems
Interviewed by BNY Mellon
1720 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
1458 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
6377 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
2497 views
0 comments
0 upvotes