Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding
Ninjas X Naukri.com

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

BNY Mellon

2 rounds | 8 Coding
problems

Preparation

Duration: 5 months

Topics: OOPS, System Design, Algorithms, Data Structures, DBMS

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

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.

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

```
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.

```
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.
```

```
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

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.

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.

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. 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.

```
If the string is “bca”, then its permutations in lexicographically increasing order are { “abc”, “acb”, “bac”, “bca”, “cab”, “cba” }.
```

```
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

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

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

Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?

Choose another skill to practice

Start a Discussion

Similar interview experiences

SDE - 1

2 rounds | 3 problems

Interviewed by BNY Mellon

4984 views

3 comments

0 upvotes

SDE - 1

3 rounds | 6 problems

Interviewed by BNY Mellon

0 views

0 comments

0 upvotes

SDE - 1

3 rounds | 6 problems

Interviewed by BNY Mellon

1454 views

0 comments

0 upvotes

SDE - 1

3 rounds | 6 problems

Interviewed by BNY Mellon

1320 views

0 comments

0 upvotes

Companies with similar interview experiences

SDE - 1

1 rounds | 2 problems

Interviewed by Tata Consultancy Services (TCS)

0 views

0 comments

0 upvotes

SDE - 1

3 rounds | 4 problems

Interviewed by Tata Consultancy Services (TCS)

5742 views

0 comments

0 upvotes

SDE - 1

2 rounds | 3 problems

Interviewed by Tata Consultancy Services (TCS)

2182 views

0 comments

0 upvotes