Convert the algorithm to a Python program
ALGORITHM uniqueElements(A[0∙∙ ? − 1])//Determines whether all the elements in a given array are distinct//input: An array A[0..n -1]//Output: Returns "true" if all the elements in A are distinct// and "false" otherwise
for i ←0 to n -2 dofor j← i+1 to n -1 doif A[i]= A[j] return falsereturn true
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here