Created
October 28, 2023 23:02
-
-
Save thmain/cf1b5b9ccf59fc02ec4c392bac6a5610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_two_repeating(A): | |
print("Repeated Elements:") | |
for i in range(len(A)): | |
for j in range(i + 1, len(A)): | |
if A[i] == A[j]: | |
print(A[i], end=" ") | |
if __name__ == "__main__": | |
A = [1, 5, 2, 4, 8, 9, 3, 1, 4, 0] | |
find_two_repeating(A) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment