MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / findUnique

Function findUnique

Python/codingninja_array_problem.py:4–14  ·  view source on GitHub ↗
(arr, n)

Source from the content-addressed store, hash-verified

2#Objective of the program is to find unique element from the list , it is possible when there are many repeating quantities,
3import sys
4def findUnique(arr, n):
5 mix = []
6 mix2 = []
7 for i in arr:
8 if i not in mix:
9 mix.append(i)
10 else:
11 mix2.append(i)
12 for j in mix:
13 if j not in mix2:
14 return j
15
16
17# Taking Input Using Fast I/O

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected