Kinda new to iOS, Im also studying Android. kinda confuse on arrays.
How to convert this into iOS:
result as being the index
nextresult[x] array of indexes
for(x = 0; x < array.size; x++)
{
if(result < nextresult[x])
nextresult[x] -= 1;
}
It will iccheck all of the content of the arrays if it needs to be adjusted or not,
Might be following will give you some idea –
As you mentioned, i have considered following –
result' is value andnextresult` is array.EDIT –
if you want to add integer in arrays –