kruti-working-branch #14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "kruti/Princeton1:kruti-working-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Good job <3 !!
@ -37,1 +31,3 @@return element;E currentValue = start.data;start = start.next;return currentValue;Case where only 1 element in queue, end pointer is dangling.
@ -15,3 +17,3 @@}// Will return true if size is 0Node<E> head = null;Why do you need two pointers, both insertion and deletion happen at head
@ -23,2 +19,2 @@mergesort(arr, aux, mid+1, hi);merge(arr, aux, lo, mid, hi);// Copy arrayE[] auxArr = (E[]) new Object[high_index - low_index + 1];Making a new aux arry with each recursive call is expensive
@ -94,0 +51,4 @@queueArray = (E[]) new Object[targetSize];int j = 0;for(int i=startPtr; i<endPtr; i++)queueArray[j++]=tempArray[i];If the old queue is wrapped, then endPtr will be less than startPtr
@ -103,0 +74,4 @@@Overridepublic E next() {return queueArray[iteratorIndex++];Iterator does not account for wrapping
Pull request closed