HacktoberFest
HacktoberFest copied to clipboard
Interview Question Cpp - Level Hard
Minimum removals are required such that the sum of the remaining array modulo M is X. Given an array arr[] consisting of N positive integers and the integers X and M, where 0 <= X < M, the task is to find the minimum number of elements required to be removed such that the sum of the remaining array modulo M is equal to X. Input: arr[] = {3, 2, 1, 2}, M = 4, X = 2 Output: 1 #hacktoberfest2021 #1559