Your question is Array Reversal Without Built-ins. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Infineon Technologies engineers may need to reorder sampled data used by an AURIX microcontroller pipeline. Given an array of values, reverse its elements in place without using array-reversal helpers.
Implement reverse_array(arr) so that it rearranges arr into reverse order and returns the same array object. Do not use reversed(), slicing, .reverse(), sorting, or any library operation that directly reverses the array. Using indexing, len(), and a temporary variable is allowed.
arr, a mutable Python list containing integers.def reverse_array(arr):