CASE III if k is odd and rightmost element in sorted array is positive then it must come in subsequence Multiplying A [ j ] with product and correspondingly changing j
if ( $ k & 1 ) { $ product *= $ A [ $ j ] ; $ j -- ; $ k -- ; }