You are given an array of integers nums
Your task is to find the length of the longest subsequence such that the bitwise XOR of all elements in that subsequence is non-zero.
If no such subsequence exists, return 0.
A subsequence is any sequence obtained by deleting some (possibly zero) elements from the array without changing the order of the remaining elements.
Input: nums = [3, 5, 6]
Output: 2
Input: nums = [4, 7, 9]
Output: 3
Accepted:
Submission: