Wiem, że prawidłowe rozwiązanie jest takie:
public class Solution {
public static int min(int a, int b, int c, int d) {
if (min(a, b) < c) {
return (min(a, b) <= d) ? min(a, b) : d;
} else {
return (c <= d) ? c : d;
}
}
public static int min(int a, int b) {
return (a <= b) ? a : b;
}
Ale nie rozumiem co ten kod robi. Proszę o wytłumaczenie krok po kroku.