Bali Pairs Logic Not Clear

I’m not clear on how I’ll use dynamic programming.

@ranaabhinav50 hi bhai,in this question ,there are some pairs given to you. Pairs may/may not contain same element.(Don’t get confused because of “shoes”)
You have to select one element from each pair.
Sum of all elements you pick should be odd.
For given test case,these are possible:
1+3 (even,invalid)
1+4 (odd,valid)
2+3 (odd,valid)
2+4 (even,invalid)
Hence answer is 2.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.