Tap here to switch tabs
Problem
Submissions

Problem: Number of Subsequences with Odd Sum

Number of Subsequences with Odd Sum asks you to count subsequences of an integer array whose selected elements add up to an odd sum, then return that total.

Statement

Given an integer array nums, return the total number of subsequences of nums whose sum of elements is odd.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Subsequences with Odd Sum

Number of Subsequences with Odd Sum asks you to count subsequences of an integer array whose selected elements add up to an odd sum, then return that total.

Statement

Given an integer array nums, return the total number of subsequences of nums whose sum of elements is odd.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤109\leq 10^9