Merge pull request #1145 from shellhub/dev · primary-code-test/Java@cbc1899 · GitHub
Skip to content

Commit cbc1899

Browse files
authored
Merge pull request TheAlgorithms#1145 from shellhub/dev
update AnyBaseToDecimal and optimization
2 parents 32e4987 + 064a84f commit cbc1899

3 files changed

Lines changed: 30 additions & 38 deletions

File tree

Conversions/AnyBaseToDecimal.java

Lines changed: 28 additions & 36 deletions

DataStructures/Lists/SinglyLinkedList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void deleteNth(int position) {
134134
* @throws IndexOutOfBoundsException if {@code position} not in range {@code low} to {@code high}
135135
*/
136136
public void checkBounds(int position, int low, int high) {
137-
if (position < low || position > high) {
137+
if (position > high || position < low) {
138138
throw new IndexOutOfBoundsException(position + "");
139139
}
140140
}

DataStructures/Stacks/BalancedBrackets.java

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)