I have an array with numbers like this:
25, 19, 14, 11, 9, 7, 5, 2
and I want to insert a number at the right position
I wrote this but I don't know if the code is true. Can you help me?
if(number > array[i] && number < array[i+1]){
rightposition = i;
}
Is this check true?