how to calculate the distance between array numbers | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

how to calculate the distance between array numbers

how to calculate the distance between array numbers

13th Sep 2018, 7:57 AM
ali.natoura
ali.natoura - avatar
2 Respuestas
+ 1
What do you mean by distance? Is it the amount of indices they are away from each other, or is it the difference between the numbers(e.g. abs(a-b))
13th Sep 2018, 9:20 AM
Jens-Emil Sønderup Müller
Jens-Emil Sønderup Müller - avatar
+ 1
key of element b - key of element a
13th Sep 2018, 9:55 AM
Sam Pache
Sam Pache - avatar