If frequency of current element is not zero and frequency of current element is less than frequency of first element and second largest , but greater than third largest .
else if ( curr . second > z . first ) {