mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-19 17:54:42 +08:00
Merge pull request #1145 from shellhub/dev
update AnyBaseToDecimal and optimization
This commit is contained in:
@ -134,7 +134,7 @@ public class SinglyLinkedList {
|
||||
* @throws IndexOutOfBoundsException if {@code position} not in range {@code low} to {@code high}
|
||||
*/
|
||||
public void checkBounds(int position, int low, int high) {
|
||||
if (position < low || position > high) {
|
||||
if (position > high || position < low) {
|
||||
throw new IndexOutOfBoundsException(position + "");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user