Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
RevArray
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.io.*; import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int[] arr = {1,2,3,4,5}; int start = 0; int end = arr.length-1; while(start<end){ int temp = arr[start]; arr[start] = arr[end]; arr[end] = temp; start+=1; end-=1; } for(int loop:arr) System.out.print(loop+" "); } }
run
|
edit
|
history
|
help
0
Search substring
Item battle rolyal
LCM using recursion
Nick-test
practicecode
Application
Hilbert Curve
problem 11: java program 11
Complex number multiplication (leetcode)
1.7