How can m1 = m2, if m1= min(c, d) and m2 = min(a, b)? obviously they are not equal to each other... I'm very lost.
public static int min(int a, int b, int c, int d) {
//write your code here
int m1 = 0;
int m2 = min(a, b);
if (c < d)
m1 = c;
else
m1 = d;
if (m2 < m1)
m1 = m2;
return m1;
}
public static int min(int a, int b) {
//write your code here
int m;
if (a < b)
m = a;
else
m = b;
return m;
}

# Can someone please explain why this worked?

Under discussion

exactlylike the 2 prior ones.