BNY Mellon OA Questions | The Puzzle of Harmony & Hiking Cost Solutions | 2026
Question · Posted Jun 2026
Problem 1 - The Puzzle of Harmony Problem Statement You are given an array of N integers. You can remove exactly one element from the array. After removing an element, the Harmony Score of the remaining array is defined as the GCD (Greatest Common Divisor) of all remaining elements. Your task is to find the maximum possible Harmony Score that can be achieved by removing exactly one element. Input Format Line 1: A single integer N Line 2: N space-separated ...
The full answer & interview discussion are available to premium members.
Log in Create a free account