java - Reversing the array without any additional buffer -


this question has answer here:

can please advise how reverse array without using additional buffer , best algorithm achieve example have below class consists of array , looking best algorithm not need create buffer or array while reversing array

public class ardem {  public static void main(string[] args)  { int[] numbers = {1, 2, 3, 4, 5, 6, 7};  } } 

well don't want use predefined method of api want create own please advise how achieve this

there exists implementation of it:

arrayutils.reverse(int[] array) 

in commons.lang.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -