Day 20
Problem Statement:-Bit Manipulation: Lonely Integer
Studied the Bit manipulation.
Solution:-
public static int lonelyInteger(int[] a) {
int value = 0;
for (int i : a)
value ^= i;
return value;
}
Problem Statement:-Bit Manipulation: Lonely Integer
Studied the Bit manipulation.
Solution:-
public static int lonelyInteger(int[] a) {
int value = 0;
for (int i : a)
value ^= i;
return value;
}
No comments:
Post a Comment