0
I have an array a. a[Math.Abs(a[i])-1] = -a[Math.Abs(a[i])-1]. What it is doing??
please help trying to understand something
5 Respostas
+ 1
it depends in the value of the variable 'i' and the values in 'a'.
+ 1
convert a positive integer to negative thanx
0
lets say a= {2,3,4}
and value of i is 0
0
my question is it assigning the value but it is calculating it as well not getting exactly what is happening
0
Here is the code and some explanation:
https://code.sololearn.com/WUpYUUDOa26G/?ref=app