I am supposed to make a function that does the following:
If a1 has n1 elements in nondecreasing order, and a2 has n2 elements in nondecreasing order, place in result all the elements of a1 and a2, arranged in nondecreasing order, and return the number of elements so placed. Return −1 if the result would have more than max elements or if a1 and/or a2 are not in nondecreasing order. (Note: nondecreasing order means that no item is > the one that follows it.)
Here is my attempt and I have no idea why it won't work
@tipaye What do you mean... If the arrays are string[] how can we say that it's in "non-decreasing order"? How can you compare two strings to see which one is "more"? I don't think that the ">" and "<" operators are overloaded for strings.