I am writing a java code for processing of signals where I have come accross a situation as explained below:
INPUT GIVEN: String Arrays arr1 and arr2. OUTPUT REQD: String Array arr3
String[] arr1= {"A", "c", "c", "", "", "c", "c", "B", "", "c","c", "", "A", "", "", "B", "B", "A"};
String[] arr2= {"2", "3", "3", "", "", "2", "1", "3", "", "2","3", "", "2", "", "", "3", "2", "3"};
String[] arr3= {"11", "", "", "", "", "", "", "8", "", "", "", "", "2", "", "", "3", "2", "3"};
ALGORITHM: 1. arr1 has elements of 4 types: "A", "B" and "c" and "".
arr2 has some Number Strings like "2", "3" etc. at corresponding index to "A", "B" and "c" in arr1, element "" in arr1 has corresponding element "" in arr2.
arr3 is to be formed from arr1 and arr2.
arr3 has Number Strings only corresponding to "A", "B" elemnts in arr1.
In arr3 the first Number String "11" is from the total of "2", "3", "3", "", "", "2", "1". These are the elements from "A" to "B"(including "A", excluding "B"). "8" is from the total of "3", "", "2","3", "". Next "2" is from the total of "2", "", "". At last it is clear that "3", "2", "3" are from "3", "2", "3" respectively.
Being new comer to programming and java I need help in the above case. Thanks in anticipation.