that is almost right... I would take out the last 2 lines that are creating new int arrays, since they are overwriting what was passed in (as a general rule, parameters of methods should not be...
Type: Posts; User: DavidFongs
that is almost right... I would take out the last 2 lines that are creating new int arrays, since they are overwriting what was passed in (as a general rule, parameters of methods should not be...
Have you tried anything? Part b can be accomplished with 2 for loops, and one statement inside the loops. It is very simple.