Add reverseUsingStringBuilder method to reverse a string (#6182)

This commit is contained in:
geetoormvn
2025-02-27 17:45:52 +07:00
committed by GitHub
parent df6da475e2
commit 849ab913c0
2 changed files with 27 additions and 0 deletions

View File

@@ -25,4 +25,10 @@ public class ReverseStringTest {
public void testReverseString2(String input, String expectedOutput) {
assertEquals(expectedOutput, ReverseString.reverse2(input));
}
@ParameterizedTest
@MethodSource("testCases")
public void testReverseString3(String input, String expectedOutput) {
assertEquals(expectedOutput, ReverseString.reverse3(input));
}
}