Skip to content

Commit 1cf4844

Browse files
add 2023
1 parent ff1cfb8 commit 1cf4844

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|2023|[Number of Pairs of Strings With Concatenation Equal to Target](https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2023.java) ||Medium||
1112
|2022|[Convert 1D Array Into 2D Array](https://leetcode.com/problems/convert-1d-array-into-2d-array/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2022.java) ||Easy||
1213
|2018|[Check if Word Can Be Placed In Crossword](https://leetcode.com/problems/check-if-word-can-be-placed-in-crossword/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2018.java) ||Medium||
1314
|2017|[Grid Game](https://leetcode.com/problems/grid-game/)|[Java](../master/src/main/java/com/fishercoder/solutions/_2017.java) ||Medium|Array, Matrix, Prefix Sum|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.fishercoder.solutions;
2+
3+
public class _2023 {
4+
public static class Solution1 {
5+
public int numOfPairs(String[] nums, String target) {
6+
int ans = 0;
7+
for (int i = 0; i < nums.length; i++) {
8+
for (int j = 0; j < nums.length; j++) {
9+
if (i != j) {
10+
String con = nums[i] + nums[j];
11+
if (con.equals(target)) {
12+
ans++;
13+
}
14+
}
15+
}
16+
}
17+
return ans;
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)