Click here to Skip to main content
15,746,534 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello frnds! I want to know how to move an element of an array to another address within the same array. Suppose the array has elements like [1 2 3 4]. The expected o/p is [4 1 2 3]. No swapping is to be done & we hav to work with only a single array. We cant copy few elements in some other array or anything like that.
Unable to get solution. Pls give some suggestions.

1 solution

There is no general solution to your problem, given the constraints (cannot swap).
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900