reverse-array
Directory actions
More options
Directory actions
More options
reverse-array
Name : Reverse an array
Language : Java
Inputs : An array of int (can be any type)
Returns : An array of int (can be any type)
Description : This algorithm reverses the received array and returns the reversed array.
Insted of cloning the array, this algorithm swaps and interchange values
on each iteration. For demonstration I've used an array of int. But it can
be any type. Process will be the same for any type.