Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Not necessary. There's a simple trick that makes it lightning fast.
That being said, the lower bound is effectively 0.
plz provide upper and lower bound
how you solve this.i got time limit
This comment is hidden because it contains spoiler information about the solution
Unit test for 1021 have mistake. Should return 1201
getting "DescendingOrder.java:30: error: reached end of file while parsing" but it seems my code work fine.
whats wrong here?
import java.util.ArrayList;
import java.util.Collections;
public class DescendingOrder {
public static int sortDesc(final int num) {
ArrayList list = new ArrayList();
StringBuilder stringBuilder = new StringBuilder();
int num1 = num;
if (num1 < 10) {
return num1;
} else {
while (num1 != 0) {
int n = num1 % 10;
num1 = num1 / 10;
list.add(n);
}
}