-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayListMain.java
More file actions
31 lines (22 loc) · 1.09 KB
/
ArrayListMain.java
File metadata and controls
31 lines (22 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
public class ArrayListMain {
public static void main(String[] args) {
ArrayPractice arrayPractice = new ArrayPractice();
int [] input = {8,1,2,2,3};
// int[] outputArray = arrayPractice.smallerNumberThanCurrent(input);
// System.out.println("output array ==> " + outputArray);
input = new int[]{2, 3, -2, -5, 6, -1, 4};
input = new int[]{1,2,3,4, 5,6};
// int [] intArray = {5, 3, -3, -4, 0, 2, -1, 4, -7, 2} ;
// System.out.println("output max product ==> " + arrayPractice.maxProduct(input));
// arrayPractice.printArray(arrayPractice.shiftZero(input));
System.out.println();
// arrayPractice.rotateArray(input,1);
// arrayPractice.rotateArrayClockWise(input,2);
arrayPractice.rotateRightArrayUsingAuxArray(input, 2);
arrayPractice.printArray(input);
// System.out.println(arrayPractice.longestPalindrome("racecar"));
// arrayPractice.partitionArray(intArray);
// System.out.println();
// arrayPractice.printArray(intArray);
}
}