Problem database last updated: June 20, 2025

BBNY Mellon logo

BNY Mellon Coding Interview Questions

21 problems · 6 Easy, 12 Medium, 3 Hard · Ranked #88 of 458

Difficulty breakdown

6 Easy

29% · avg 23%

12 Medium

57% · avg 59%

3 Hard

14% · avg 18%

Top topics

array
66.7%
string
33.3%
dynamic-programming
28.6%
hash-table
28.6%
two-pointers
28.6%2.1x
greedy
23.8%2.8x

Interview profile

Based on 21 reported problems, BNY Mellon interviews are in line with industry averages - 14% Hard vs 18% overall. The majority (57%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, BNY Mellon puts unusual emphasis on prefix-sum (9.5% of problems, 2.9x the industry average), greedy (23.8% of problems, 2.8x the industry average), two-pointers (28.6% of problems, 2.1x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (66.7%), string (33.3%), dynamic-programming (28.6%), hash-table (28.6%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 21 problems

Count Visited Nodes in a Directed Graph

Solve

There is a directed graph consisting of n nodes numbered from 0 to n - 1 and n directed edges.

HardVery Likely
dynamic-programmingdepth-first-searchgraph

Minimize Length of Array Using Operations

Solve

You are given a 0-indexed integer array nums containing positive integers.

MediumVery Likely
arraymathgreedy

Sum of Distances

Solve

You are given a 0-indexed integer array nums. There exists an array arr of length nums.length, where arr[i] is the sum of |i - j| over all j such that nums[j] =...

MediumVery Likely
arrayhash-tableprefix-sum

Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts

Solve

You are given a rectangular cake of size h x w and two arrays of integers horizontalCuts and verticalCuts where:

MediumVery Likely
arraygreedysorting

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumVery Likely
arrayhash-tablestring

Minimum Number of Taps to Open to Water a Garden

Solve

There is a one-dimensional garden on the x-axis. The garden starts at the point 0 and ends at the point n. (i.e., the length of the garden is n).

HardVery Likely
arraydynamic-programminggreedy

Palindromic Substrings

Solve

Given a string s, return the number of palindromic substrings in it.

MediumLikely
two-pointersstringdynamic-programming

Minimum Number of Groups to Create a Valid Assignment

Solve

You are given a collection of numbered balls and instructed to sort them into boxes for a nearly balanced distribution. There are two rules you must follow:

MediumLikely
arrayhash-tablegreedy

Gas Station

Solve

There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i].

MediumLikely
arraygreedy

Find The Count Of Monotonic Pairs II

Solve

You are given an array of positive integers nums of length n. We call a pair of non-negative integer arrays (arr1, arr2) monotonic if both arrays have length n,...

HardLikely
arraymathdynamic-programming

Count Vowel Substrings of a String

Solve

A substring is a contiguous (non-empty) sequence of characters within a string.

EasyLikely
hash-tablestring

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyLikely
arrayhash-map

Reverse Words in a String III

Solve

Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.

EasyLikely
two-pointersstring

Longest Substring Without Repeating Characters

Solve

Given a string s, find the length of the longest substring without duplicate characters.

MediumLikely
hash-tablestringsliding-window

Roman to Integer

Solve

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.

EasyLikely
hash-tablemathstring

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasyLikely
arraydynamic-programming

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumLikely
arraytwo-pointerssorting

Longest Palindromic Substring

Solve

Given a string s, return the longest palindromic substring in s.

MediumLikely
two-pointersstringdynamic-programming

Move Zeroes

Solve

Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.

EasyLikely
arraytwo-pointers

Car Fleet

Solve

There are n cars at given miles away from the starting mile 0, traveling to reach the mile target.

MediumLikely
arraystacksorting

Total Cost to Hire K Workers

Solve

You are given a 0-indexed integer array costs where costs[i] is the cost of hiring the ith worker.

MediumLikely
arraytwo-pointersheap-priority-queue

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent BNY Mellon interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your BNY Mellon coding interview

BNY Mellon interviews focus heavily on array, string, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. BNY Mellon interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does BNY Mellon ask in interviews?add

BNY Mellon has been reported to ask 21 distinct coding problems. The most common topics are array, string, dynamic-programming. 6 are Easy difficulty, 12 are Medium, and 3 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are BNY Mellon coding interviews?add

Based on 21 reported problems, BNY Mellon interviews are in line with industry averages - 14% Hard vs 18% overall. 57% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a BNY Mellon coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your BNY Mellon interview?

Simulate a real BNY Mellon coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a BNY Mellon interview with AIarrow_forward