Skip to content

Commit

Permalink
Revert "1"
Browse files Browse the repository at this point in the history
This reverts commit 6ef7280.
  • Loading branch information
VirtualLights committed Oct 6, 2016
1 parent 6ef7280 commit 761756e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/TechInterview/SinglyLinkedList.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Node remove(int index) {
}

public E get(int index) {
if (index >= 0 && index < size) {
if (index > 0 && index < size) {
Node curr = head;
for (int i = 0; i <= index; i++) {
curr = curr.next;
Expand Down Expand Up @@ -81,10 +81,8 @@ public String toString() {
return sb.toString();
}

public int size() {
return size;
}

public class Node {

private Node next;
Expand Down

0 comments on commit 761756e

Please sign in to comment.