Skip to content

Commit 6f3a0ea

Browse files
committed
Revert "Refactored ReverseStringUsingStack utility for reversing strings using stack"
This reverts commit e091e22.
1 parent b111de3 commit 6f3a0ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/thealgorithms/strings/ReverseString.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public static String reverse3(String string) {
6666
* and then pops them off to create the reversed string.
6767
*/
6868
public static String reverse4(String str) {
69-
// Check if the input string is null
7069
if (str == null) {
7170
throw new IllegalArgumentException("Input string cannot be null");
7271
}
@@ -86,4 +85,4 @@ public static String reverse4(String str) {
8685
}
8786
return reversedString.toString();
8887
}
89-
}
88+
}

0 commit comments

Comments
 (0)