I have checked the forum to see that I am the answer to this question but so far, not me I have this 2 dimensional array that I want to add to their values if they are similar here is an example.
CAR CH 394 CAR CH 96 CAR CAP 268 DOOR CAF 71 DOR CAP 96 DOR CAP 268 VACC DISTRICT 71
Array, I have the above values. How do I add all duplicates to the array list? In this case, this is the CAR and DOR. Cap will affect. Therefore, instead of returning to duplicate, to return the combined sum to the combined sum.
if I understand what you are saying correctly ( Because it is not really very clear), and given that your array has already been sorted, then I can use it by using it:
If you get the first two elements, then you add the last one to the previous value and return the array. If they do not match, then you press the new value in the array.
No comments:
Post a Comment