We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Arrays
- Arrays - DS
- Discussions
Arrays - DS
Arrays - DS
Sort by
recency
|
2216 Discussions
|
Please Login in order to post a comment
Mobile number
While maintaining a clear and concise logic, this strategy greatly enhances performance. Learning how to optimize loops and use modular properties in programming challenges is a great exercise. Open this problem on HackerRank by Basement Remodeling Fort Collins this link if you want to investigate or attempt it on your own.
For JAVA since here the input as well as the output in list so we will the methods of list like a.set(index, value) to replace an element instead of adding new ones, and a.get(index) which will the value on the given index
c# :
def reverseArray(a): # Write your code here return list(reversed(a));