public static int[] bubbleSort(int[] a) {
		int tmp;
		boolean switched;
		for (int j=1; j <= a.length; j++) {
			switched = false;
			for (int i=0; i<a.length-j; i++) {
				if (a[i] > a[i+1]) {
					tmp = a[i];
					a[i] = a[i+1];
					a[i+1] = tmp;
					switched = true;
				}
			}
			if (!switched) {
				break;
			}
		}
		return a;
	}