25 апреля 2025
Фотография
нажмите — покажем
нажмите — покажем
Фотография
нажмите — покажем
нажмите — покажем
Фотография
нажмите — покажем
нажмите — покажем
Фотография
нажмите — покажем
нажмите — покажем
Book your 4PM & 7PM CTS SLOTS 👇
https://esb-2dur.onrender.com/
Note: GOLDSMAN SACHS SLOTS ARE OPENED ✅
Contact : @MLCODER2
641 · public class Main {
public static int[] countGreaterAdjacent(int input1, int[] input2) {
int N=input1;
int[] A=input2;
int[] result = new int[N];
for (int i = 0; i < N; i++) {
int count = 0;
if (i == 0) {
if (A[1] > A[0]) count++;
if (A[N - 1] > A[0]) count++;
} else if (i == N - 1) {
if (A[0] > A[N - 1]) count++;
if (A[N - 2] > A[N - 1]) count++;
} else {
if (A[i - 1] > A[i]) count++;
if (A[i + 1] > A[i]) count++;
}
result[i] = count;
}
return result;
}
600 ·