Two of my machines each keep their own sorted list of jobnumbers. I want one combined list, still sorted, and I do notwant you to just glue them together and sort the result. Thatis wasteful and I will be able to tell.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
new int[a.Length + b.Length]: its size is known before you start. Count your steps and compare the count with that length.Merged: 1 3 9 9 14 15 22 30 41Steps: 9 (a has 4, b has 5)Nine steps for nine numbers: every number is placed exactly once. Gluing and then selection-sorting would cost 36 comparisons.
Your requirements list and your program file, named cc-merge-lists.