You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have recently resolved the task number 561.
According to my understanding, the task do not concisely describes a problem.
For example, if we were going to find all possible pairs of elements, we should have had cartesian product of them.
Motivation
Description is not clearly describe a final achievable solution.
Contribution
Please consider the code below
public class task561 {
public static void main(String[] args) {
int [] nums = {1,4,3,2};
int lng = nums.length - 1;
int i = 0, j, l, k = lng;
int count = Integer.MIN_VALUE, number = 0;
while (i < lng){
j = i + 1;
while (j <= lng){
while (k >= 0){
l = k - 1;
while (l >= 0){
number = Math.min(nums[i],nums[j]) + Math.min(nums[k], nums[l]);
l--;
}
k--;
}
k = lng;
System.out.println(number);
j++;
}
i++;
}
}
}
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
Hello,
I have recently resolved the task number 561.
According to my understanding, the task do not concisely describes a problem.
For example, if we were going to find all possible pairs of elements, we should have had cartesian product of them.
Motivation
Description is not clearly describe a final achievable solution.
Contribution
Please consider the code below
The text was updated successfully, but these errors were encountered: