PPT Slide
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)
Store in h the index of the maximum value
(l) j= n+1; ev= 0; od= 0;
// Invariant P (see the problem description)
if (b[j] % 2 = 0) ev= ev+1;
// Invariant P (see the problem description)
if ( b[h].length > b[j] ) h= j;
// Invariant P (see the problem description)
// Invariant P (see the problem description)
// Invariant P (see the problem description)