Skip to content

Commit 064a84f

Browse files
statistics optimization
1 parent 87fcd2c commit 064a84f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DataStructures/Lists/SinglyLinkedList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void deleteNth(int position) {
106106
* @throws IndexOutOfBoundsException if {@code position} not in range {@code low} to {@code high}
107107
*/
108108
public void checkBounds(int position, int low, int high) {
109-
if (position < low || position > high) {
109+
if (position > high || position < low) {
110110
throw new IndexOutOfBoundsException(position + "");
111111
}
112112
}

0 commit comments

Comments
 (0)