atyant-yadav / Hacktoberfest2020

A repo for new open source contributors to begin with open source contribution. Contribute and earn awesome swags.
MIT License
209 stars 828 forks source link

Shuffling Problem #1399

Open Bipradeep02 opened 2 years ago

Bipradeep02 commented 2 years ago

Provided an array A, shuffle all the elements and create a new array B in such a way that each element B[i] is (A[i] + i)%2 . Now find the maximum possible sum of integers of the array B, if you shuffle the array optimally.