Good Evening Friends,
I am working on some sorting tasks with lists and I was able to implement a solution but my solution takes too long.
Execution timed out after 5000ms....
Here are the details of the task:
- List with n+1 Elements
- Output should be like this
My approach was simply to create a new list, start from the tail and the head of the old list add each element in the new list and go next to tail+1 and head-1 until all elements are transferred.
As mentioned before, the program works but the approach takes to long.
Does anybody have a better idea to speed up the process?