Question: makeMiddle http://codingbat.com/prob/p265802 Java Python makeMiddle Given an array of ints, return a new array containing the middle element(s) from the original array. If the length
makeMiddle http://codingbat.com/prob/p265802

Java Python makeMiddle Given an array of ints, return a new array containing the middle element(s) from the original array. If the length of the parameter array is odd, the result array will be length 1. If the parameter array has an even length, the result will contain the middle two values. The original array will be at least length 1. makeMiddle([1, 2, 3, 4]) [2, 3] makeMiddle([7, 1, 2, 3, 4, 9]) [2, 3] makeMiddle([1, 2, 3, 4, 5]) [3] Go Save, Compile, Run (ctrl-enter) public int makeMiddleCint] nums)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
