Skip to content

Commit 891b819

Browse files
refactor 541
1 parent 786a49a commit 891b819

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

src/main/java/com/fishercoder/solutions/_541.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 541. Reverse String II
5-
*
6-
* Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string.
7-
* If there are less than k characters left, reverse all of them.
8-
* If there are less than 2k but greater than or equal to k characters, then reverse the first k characters and left the other as original.
9-
10-
Example:
11-
Input: s = "abcdefg", k = 2
12-
Output: "bacdfeg"
13-
14-
Restrictions:
15-
The string consists of lower English letters only.
16-
Length of the given string and k will in the range [1, 10000]
17-
*/
183
public class _541 {
194

205
public static class Solution1 {

0 commit comments

Comments
 (0)