can someone please help. I'm taking an intro to java class, and I can't do it anymore. I have no clue where to even start. I have two programs left to do before the end of the course. One is due by midnight(eastern) tonight, and the other is due by midnight(eastern) next week. If anyone can help me out, please email me at Alliebee2@yahoo.com. I really need help with this, it's an online course and I don't have anyone else to help me with it.
sorry, i was in such in crunch to get that one done that i completely forgot. the last on is as follows:
design and implement an insertion sort hat operates on a linked list of nodes that each contain an integer. I have a basic idea of how to do it. this is what i have so far.
public void insertionSort(Comparable a[]) { for (int i=1; i<a.length; i++) { Comparable val = a; int k=i; while (k>0 && val.compareTo(a[k-1])<0) { a[k] = a[k-1]; k--; } a[k]=val; } }
I guess I don't understand the part about the linked list of nodes containing integers. Is that the same as having an array with integers stored in it? will the code I have do what the problem is asking for?