my solution gives below decending output
123
integerArray is [0, 0, 0]
Splitted the
String up into an array that has 1 element per character in the String [1, 2, 3]
integerArray before sorting[1, 2, 3]
integerArray after sorting[1, 2, 3]
3
2 2
1 1 1
not sure on how to get ascending output
Also not sure on how to seperate printing space and priting digits to two different methods. I replaced space with . and printing at wrong location as below. I was thinking it is not possible to separate my code two separate methods as both space and digits depend on common for loop of noOfRows
312
integerArray is [0, 0, 0]
integerArray before sorting...[3, 1, 2]
noOfRows value in printSpaces--->3
......noOfRows value is printElements--->3
3
2 2
1 1 1