extremalindex function

Extemal Index