Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Conversation

Pranjalmandalia
Copy link

@Pranjalmandalia Pranjalmandalia commented Oct 2, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants