Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class AbstractSort {
- /* Returns whether the first element is less than the second one */
- public static boolean less(int v, int w) {
- return v < w;
- }
- /* Swaps the two elements in an array */
- public static void swap (int[] elements, int a, int b) {
- int tmp = elements[a];
- elements[a] = elements[b];
- elements[b] = tmp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement