An array 'S' contain n distinct elements. Consider a functionfi which is defined as:
fi={max(a,b,c)|∀a,b,c∈Sanda≠b≠c}
What is the worst case time complexity to find set of all possible elements which are returned by function fi
when array 'S' is passed as an argument?