Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution {
- /**
- * @param A an integer array
- * @return void
- */
- public void sortIntegers(int[] A) {
- // Write your code here
- int n = A.length;
- for (int i = 0; i < n; ++i)
- for (int j = i+1; j < n; ++j)
- if (A[j] < A[i]) {
- int t = A[j];
- A[j] = A[i];
- A[i] = t;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment