I am dealing with a problem and that problem requires the answer to this as a subroutine. I know how to generate all subsequences from an array using bit manipulation but struggling to generate subsequences of even length.
For the sake of example, assume that there is an array A = [2, 5, 4, 2, 3, 1]
I want all the subsequences of even length i.e., of length 2, 4, and 6.
Edit 1: 1<=N<=1000 where N is the size of the array.