Based on whether num
is odd or even it will give 0
and 1
But sir that problem finally is delivering odd values.
5 & 1 will give 0
4 & 1 will give 1
Let say for example:
23 & 1
= 1 + 0(last digits of 8 bits binary) = 0 → This will return 0 and this is getting filtered in the final filtered array.
Based on some explanation here.