Given an array of integers nums, return an array containing the integers in reverse order, without using built-in functions.
Example:
Input: nums =[2, 9, 1, 5, 8]Output:[8, 5, 1, 9, 2]
Note:
Do not use builtin functions such as
reverse(), it would defy the purpose of the challenge. Write the whole code yourself.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check