Thursday, November 28, 2013
Tuesday, November 26, 2013
Friday, November 22, 2013
Delete Last Node (Head not not given) LInked Lists
public void deleteLast(){
//check if this is the last node
if(this.next == null) {
this = null;
return;
}
//look 2 nodes ahead to see if we have reached the end
Node temp = this;
while(temp.next.next != null){
temp = temp.next;
}
//Finally, move to last node and set it null
temp = temp.next;
temp = null;
}
Monday, November 18, 2013
Monday, November 11, 2013
Sorting Algorithms
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Counting Sort
- Radix Sort
- Bucket Sort
http://www.cs.carleton.edu/faculty/adalal/teaching/f04/117/notes/searchSort.pdf
http://cusatstudymaterials.files.wordpress.com/2013/04/137877333-sorting-algorithms-in-java.pdf
http://www.sorting-algorithms.com/
http://cusatstudymaterials.files.wordpress.com/2013/04/137877333-sorting-algorithms-in-java.pdf
http://www.sorting-algorithms.com/
Friday, November 8, 2013
Subscribe to:
Posts (Atom)