MAQ Software Interview Question

get nth max element of array .