I solved this problem, Odd-Even Subsequence using binary search. But I also saw the tag DSU. I went for the tutorial but there is only the binary search approach. I am having a hard time connecting this problem to DSU. Can anybody explain how to solve this using DSU