human
Find the largest three distinct elements in an array | Python3 code to find largest three elements in an array.
It uses Tuned Quicksort with.
avg . case Time complexity = O ( nLogn ).
to handle duplicate values.
Driver code"
How can the above be solved in Python?

=====
What is a code to find the largest three distinct elements in an array and the other steps required?
assistant
#Here is code to find the largest three distinct elements in an array and the other steps required.
 def find3largest ( arr , n ) :
	arr = sorted ( arr )
	check = 0
	count = 1
	for i in range ( 1 , n + 1 ) :
		if ( count < 4 ) :
			if ( check != arr [ n - i ] ) :
				print ( arr [ n - i ] , end = " ▁ " )
				check = arr [ n - i ]
				count += 1
		else :
			break
arr = [ 12 , 45 , 1 , - 1 , 45 , 54 , 23 , 5 , 0 , - 10 ]
n = len ( arr )
find3largest ( arr , n )