Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfae0de7

Browse files
refactor 1374
1 parent54866f7 commitfae0de7

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

‎src/main/java/com/fishercoder/solutions/_1374.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 1374. Generate a String With Characters That Have Odd Counts
5-
*
6-
* Given an integer n, return a string with n characters such that each character in such string occurs an odd number of times.
7-
* The returned string must contain only lowercase English letters. If there are multiples valid strings, return any of them.
8-
*
9-
* Example 1:
10-
* Input: n = 4
11-
* Output: "pppz"
12-
* Explanation: "pppz" is a valid string since the character 'p' occurs three times and the character 'z' occurs once. Note that there are many other valid strings such as "ohhh" and "love".
13-
*
14-
* Example 2:
15-
* Input: n = 2
16-
* Output: "xy"
17-
* Explanation: "xy" is a valid string since the characters 'x' and 'y' occur once. Note that there are many other valid strings such as "ag" and "ur".
18-
*
19-
* Example 3:
20-
* Input: n = 7
21-
* Output: "holasss"
22-
*
23-
* Constraints:
24-
* 1 <= n <= 500
25-
* */
263
publicclass_1374 {
274
publicstaticclassSolution1 {
285
publicStringgenerateTheString(intn) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp