CDVNT01E - Editorial

PROBLEM LINK:

Practice

Contest: CodeVenture 1.0

Setter: Nisarg Thakkar

Tester: Krunal Mathukiya

Editorialist: Malhar Patel

DIFFICULTY:

Easy-medium

PREREQUISITES:

Nothing

PROBLEM:

The idea behind the problem boils down to following : You have to find the total sum of all the subsets of the set that has an odd sum.

EXPLANATION

One simple approach is to generate all possible subsequences recursively and count the number of subsequences with even sum and then subtract from total subsequences and the number will be of odd subsequence.

SOLUTIONS:

CPP solution

Code

Feel free to Share your approach, if you want to. (even if it’s the same :stuck_out_tongue: ) . Suggestions are welcomed as always. :slight_smile: