Skip to content

Commit

Permalink
Fixed typo in SLList in Lab 3
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-kulkarni committed Feb 2, 2021
1 parent 4340140 commit 364a7c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lab3/timingtest/SLList.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public void addLast(Item x) {

/** returns last item in the list */
public Item getLast() {
size = size + 1;

IntNode p = sentinel;

/* Advance p to the end of the list. */
Expand All @@ -69,7 +67,7 @@ public Item getLast() {
}


/** Returns the size of the list. */
/** Returns the size of the list. */
public int size() {
return size;
}
Expand All @@ -80,4 +78,4 @@ public static void main(String[] args) {
L.addLast(20);
System.out.println(L.size());
}
}
}

0 comments on commit 364a7c2

Please sign in to comment.