private void heapDown(char[] str, int end)
	{
		int parent=0;
		while (parent<end){
			int leftChild=2*parent+1;
			int rightChild=leftChild+1;
			if (leftChild==end){ //Only Left Child exists
				if (heapData[parent] < heapData[leftChild])
				{
					swap(parent,leftChild);
					parent=leftChild;
				}
				else{break;}
			}
			else if (rightChild<=end){ //Both children exist
				if (heapData[parent] < heapData[leftChild] 
						&& heapData[rightChild] <= heapData[leftChild])
				{
					swap(parent,leftChild);
					parent=leftChild;
				}
				else if(heapData[parent] < heapData[rightChild] 
						&& heapData[leftChild] <= heapData[rightChild])
				{
					swap(parent,rightChild);
					parent=rightChild;
				}
				else{break;}
			}
			else {break;} //Boundary case e.g. 0 case
		}
	}