HacktoberFest icon indicating copy to clipboard operation
HacktoberFest copied to clipboard

Interview Question Cpp - Level Hard

Open Pranjalmandalia opened this issue 4 years ago • 0 comments

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

Pranjalmandalia avatar Oct 02 '21 10:10 Pranjalmandalia