All pastes #803615 Raw Edit

Miscellany

public java v1 · immutable
·published 2007-12-02 12:41 UTC
rendered paste body
	public String deleteElement (int value){				int found= findElementLoc(value); 		int fore, back;				if (found == -99){			return "Item not present in the table";		}		else {						if(table[found].getForLink() != -1) { //Checking if we are not at end of the list			   				if (table[found].getBackLink() != -1){ //Checking if we are not at beginning of list								back = table[found].getBackLink();				fore = table[found].getForLink();				table[fore].setBackLink(back);				table[back].setForLink(fore);				}								else { //Beginning of list					fore =table[found].getForLink();										table[fore].setBackLink(-1);															}			}						else { //End of list								back =table[found].getBackLink();				table[back].setForLink(-1);			}										}