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

Commit7cbfdbb

Browse files
refactor 1347
1 parent449dc25 commit7cbfdbb

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

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

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,6 @@
22

33
importjava.util.Arrays;
44

5-
/**
6-
* 1347. Minimum Number of Steps to Make Two Strings Anagram
7-
*
8-
* Given two equal-size strings s and t. In one step you can choose any character of t and replace it with another character.
9-
* Return the minimum number of steps to make t an anagram of s.
10-
* An Anagram of a string is a string that contains the same characters with a different (or the same) ordering.
11-
*
12-
* Example 1:
13-
* Input: s = "bab", t = "aba"
14-
* Output: 1
15-
* Explanation: Replace the first 'a' in t with b, t = "bba" which is anagram of s.
16-
*
17-
* Example 2:
18-
* Input: s = "leetcode", t = "practice"
19-
* Output: 5
20-
* Explanation: Replace 'p', 'r', 'a', 'i' and 'c' from t with proper characters to make t anagram of s.
21-
*
22-
* Example 3:
23-
* Input: s = "anagram", t = "mangaar"
24-
* Output: 0
25-
* Explanation: "anagram" and "mangaar" are anagrams.
26-
*
27-
* Example 4:
28-
* Input: s = "xxyyzz", t = "xxyyzz"
29-
* Output: 0
30-
*
31-
* Example 5:
32-
* Input: s = "friend", t = "family"
33-
* Output: 4
34-
*
35-
* Constraints:
36-
* 1 <= s.length <= 50000
37-
* s.length == t.length
38-
* s and t contain lower-case English letters only.
39-
* */
405
publicclass_1347 {
416
publicstaticclassSolution1 {
427
publicintminSteps(Strings,Stringt) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp