Skip to content

Commit c32daf2

Browse files
committedJul 7, 2024·
add 3210
1 parent 80b294d commit c32daf2

File tree

2 files changed

+14
-0
lines changed
  • paginated_contents/algorithms/4th_thousand
  • src/main/java/com/fishercoder/solutions/fourththousand

2 files changed

+14
-0
lines changed
 

‎paginated_contents/algorithms/4th_thousand/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| # | Title | Solutions | Video | Difficulty | Tag
22
|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|------------|----------------------------------------------------------------------
3+
| 3210 | [Find the Encrypted String](https://leetcode.com/problems/find-the-encrypted-string/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3210.java) | | Easy |
34
| 3208 | [Alternating Groups II](https://leetcode.com/problems/alternating-groups-ii/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3208.java) | | Medium |
45
| 3206 | [Alternating Groups I](https://leetcode.com/problems/alternating-groups-i/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3206.java) | | Easy |
56
| 3200 | [Maximum Height of a Triangle](https://leetcode.com/problems/maximum-height-of-a-triangle/) | [Java](https://github.com/fishercoder1534/Leetcode/blob/master/src/main/java/com/fishercoder/solutions/fourththousand/_3200.java) | | Easy |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.fishercoder.solutions.fourththousand;
2+
3+
public class _3210 {
4+
public static class Solution1 {
5+
public String getEncryptedString(String s, int k) {
6+
StringBuilder sb = new StringBuilder();
7+
for (int i = 0; i < s.length(); i++) {
8+
sb.append(s.charAt((i + k) % s.length()));
9+
}
10+
return sb.toString();
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)
Please sign in to comment.