Computer Science, asked by supritasnaik23, 3 months ago

java program to find the missing numbers using function

Answers

Answered by kanaksharma482
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
Math, 3 months ago