Skip to content

Commit

Permalink
commit-3
Browse files Browse the repository at this point in the history
  • Loading branch information
kmchau428 committed Jan 21, 2016
1 parent fb277c3 commit 8f6b7ca
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/java/com/develogical/app/QueryProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,20 @@ else if (query.toLowerCase().contains("primes")) {
}

}

int[] ansList = new int[ans.size()];
int index = 0;
for (String s : ans) {
ansList[index++] = (Integer.valueOf(s));
}
Arrays.sort(ansList);

String k = "";
for (int i : ansList) {
k += i + ",";
}

return String.join(", ", ans);
return k;

}

Expand Down Expand Up @@ -148,7 +160,7 @@ public boolean isPrime(int n) {
}

public int fib (int n) {
int a = 0;
int a = 1;
int b = 1;

for (int i = 0; i < n-1; i++) {
Expand Down

0 comments on commit 8f6b7ca

Please sign in to comment.