Your question is Reverse Linked List or Sort Efficiently. 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.
Bosch ESI[tronic] can represent diagnostic event identifiers as an ordered Python list. Given the list and two inclusive indices, reverse only the elements between those indices in place, then return the modified list.
Do not create a second list proportional to the reversed range. The elements outside the selected range must remain unchanged.
Implement reverse_range(nums, left, right).
nums, a list of integers; left and right, inclusive zero-based indices.nums[left:right + 1].def reverse_range(nums, left, right):