-
Right-click ‘dot.java’ class and select Run As->Java Application
-
Output will be displayed in the Eclipse IDE->Console
For an input N = 25, output will be 15511210043330985984000000.
Given an array with n elements, sort this array in ascending order using only one of the following operations.
2
4 2
yes
swap 1 2
3 3 1 2
no
6
1 5 4 3 2 6
yes reverse 2 5
4 4 1
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
2 3 4 8
1 7 11 12
5 6 10 16
9 13 14 15
4 4 2
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3 4 8 12
2 11 10 16
1 7 6 15
5 9 13 14
5 4 7
1 2 3 4
7 8 9 10
13 14 15 16
19 20 21 22
25 26 27 28
28 27 26 25
22 9 15 19
16 8 21 13
10 14 20 7
4 3 2 1
2 2 3
1 1
1 1
1 1
1 1