One of the shops in hackerMall is offering discount coupons based on a puzzling porblem. There are
Fantastic news! We've Found the answer you've been seeking!
Question:
One of the shops in hackerMall is offering discount coupons based on a puzzling porblem. There are n tags, where each tag has a value denoted by val[i]. A customer needs to choose teh tags in such a way that the sum of values is even. Teh goal is to find the maxcimum possible even sum of tags that can be chosen.
Note:
It is guaranteed taht there is atleast one tag with an even value.
The tags can have positive or negative value
It can be possible to choose no tags at all
Function description:
Complete the function getMaximumEvenSum in the editor below
getMaximumEvenSum has teh following parameters:
int val[n]: the values of tag in the shop of hackerMall
Returns:
long_int: the maximum even sum of tag values
COntraints:
1<=n<=10^5
−10^9<=val[i]<=10^9
Related Book For
Cost Accounting A Managerial Emphasis
ISBN: 978-0133392883
6th Canadian edition
Authors: Horngren, Srikant Datar, George Foster, Madhav Rajan, Christ
Posted Date: