Skip to content

Instantly share code, notes, and snippets.

@thmain
Created October 28, 2023 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thmain/cf1b5b9ccf59fc02ec4c392bac6a5610 to your computer and use it in GitHub Desktop.
Save thmain/cf1b5b9ccf59fc02ec4c392bac6a5610 to your computer and use it in GitHub Desktop.
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