public static void sortString(String[] strings, int longestBit) {
		int currBit = 1;
		int bucketNum = 256+1; // Additional one bit for the string which is smaller than the longestBit size
		String[][] bucket = new String[bucketNum][strings.length];
		int[] bucketCount = new int[bucketNum];
		
		while (currBit<=longestBit) {
			for (int i=0; i<strings.length; i++) {
				String currString = strings[i];
				if(longestBit-currBit>=currString.length()) {
					// current string is smaller than the longestBit size
					// And then put it into the last bucket
					bucket[256][bucketCount[256]] = strings[i];
					bucketCount[256]++;
				} else {
					char currChar = currString.charAt(longestBit-currBit);
					bucket[currChar][bucketCount[currChar]] = strings[i];
					bucketCount[currChar]++;
				}
			}
			
			int k = 0;
			if(bucketCount[256] != 0) {
				for (int j=0; j<bucketCount[256]; j++) {
					strings[k] = bucket[256][j];
					k++;
				}
				bucketCount[256] = 0;
			}
			for (int i=0; i<bucketNum-1; i++) {
				if (bucketCount[i] != 0)
					for (int j=0; j<bucketCount[i]; j++) {
						strings[k] = bucket[i][j];
						k++;
					}
				bucketCount[i] = 0;
			}
			k = 0;
			currBit++;
		}
		
	}