java program to find the missing numbers using function
Answers
Answered by
0
Explanation:
Find the missing number in a given array. public static int getMissingNumber(int[] arr) {
for (int i: arr) { xor = xor ^ i; }
for (int i = 1; i <= arr. length + 1; i++) { xor = xor ^ i; }
{ int[] arr = { 1, 2, 3, 4, 5, 7, 8, 9, 10 };
Hope it helps you plz mark me as brainlist answer ‼️
Similar questions