Мне трудно понять логику метода, чтобы найти второе наибольшее число в массиве. Используемый метод состоит в том, чтобы найти наивысший массив, но меньше предыдущего (который уже найден). Дело в том, что я до сих пор не могу понять, почему || highest_score == second_highest
необходимо. Например, я ввожу три числа: 98, 56, 3. Без него как высшие, так и самые высокие будут 98. Объясните.
int second highest = score[0];
if (score[i] > second_highest && score[i] < highest_score || highest_score == second_highest)
second_highest = score[i];