public char[] removeDuplicate(char[] array) {
		char[] tmpArray = new char[array.length];
		char tmp = array[0];
		tmpArray[0] = tmp;

		int duplicateCount = 0;
		int tmpArrayIndex = 1;
		for (int i = 1; i < array.length; i++) {
			if (tmp != array[i]) {
				tmpArray[tmpArrayIndex] = array[i];
				tmpArrayIndex++;

			} else {
				duplicateCount++;
			}
			tmp = array[i];
		}
		char[] resultingArray = new char[array.length - duplicateCount];

		for (int i = 0; i < array.length - duplicateCount; i++) {
			resultingArray[i] = tmpArray[i];
		}
		return resultingArray;
	}