Given an int array nums that contains an odd number of elements, assign its middle element to 0.
int
nums
0
You will need to use nums.length to calculate the index of the middle element.
nums.length
For this problem we're expecting just a snippet of codeāso don't provide a method or class declaration.
Stuck? You may find these lessons helpful: