Skip to content

[Feature Request]: Adding Leet Code Question 3190 #1904

Closed
@Saipradyumnagoud

Description

@Saipradyumnagoud

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

You are given an integer array nums. In one operation, you can add or subtract 1 from any element of nums.

Return the minimum number of operations to make all elements of nums divisible by 3.

Use Case

Input: nums = [1,2,3,4]

Output: 3

Explanation:

All array elements can be made divisible by 3 using 3 operations:

Subtract 1 from 1.
Add 1 to 2.
Subtract 1 from 4.

Benefits

No response

Add ScreenShots

No response

Priority

High

Record

  • I have read the Contributing Guidelines
  • I'm a GSSOC'24 contributor
  • I have starred the repository

Metadata

Metadata

Labels

CodeHarborHub - Thanks for creating an issue!GSSOC'24GirlScript Summer of Code | ContributordocumentationImprovements or additions to documentationgssocGirlScript Summer of Code | Contributorlevel1GirlScript Summer of Code | Contributor's Levels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions