Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 18
Missing number
How do you find the missing number of an integer array of 1-100?
7 Respostas
+ 10
let,
s is the sum of the array you have.
then,
the missing will be: 5050-s
let me explain....
the sum of the numbers from 1 to 100 will be..
((1+100)*100)/2=5050..
Now if s is the sum of the numbers you have, you can simply find the missing number by substracting s from 5050.
+ 18
Another method of finding the missing number of an array of 1-100
https://code.sololearn.com/cIidenkA3xHs/?ref=app
+ 15
Copy....Thanks Tind
+ 14
That was perfect NimWing Yuan....Thanks a lot
+ 6
Fpharbhulourz Solution : š š¤šāāļø
https://code.sololearn.com/cGvqJdYNVTp7/?ref=app
+ 5
Fpharbhulourz : You are wellcome š šāāļøš¤
+ 2
Here you can find the code to find multiple missing numbers in an array
Modified code of NimWing Yuan
Thanks
https://code.sololearn.com/cIuh1i1QiSS9/?ref=app