Professional Documents
Culture Documents
Arrays
Arrays
Method 1:
Time complexity: O(n)
Using normal logic (n*(n+1)/2) –(summation of the given array) yields the
misiing value
Method 2:
Time complexity: O(n)
Using set Interface
Method 3:
Time complexity:O(n)
Using Hashset
Method 4:
Time complexity: O(n)
We find it using exor operation