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

Commitf154fff

Browse files
refactor 1213
1 parent930b934 commitf154fff

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,11 @@
33
importjava.util.ArrayList;
44
importjava.util.List;
55

6-
/**
7-
* 1213. Intersection of Three Sorted Arrays
8-
*
9-
* Given three integer arrays arr1, arr2 and arr3 sorted in strictly increasing order,
10-
* return a sorted array of only the integers that appeared in all three arrays.
11-
*
12-
* Example 1:
13-
* Input: arr1 = [1,2,3,4,5], arr2 = [1,2,5,7,9], arr3 = [1,3,4,5,8]
14-
* Output: [1,5]
15-
* Explanation: Only 1 and 5 appeared in the three arrays.
16-
*
17-
* Constraints:
18-
*
19-
* 1 <= arr1.length, arr2.length, arr3.length <= 1000
20-
* 1 <= arr1[i], arr2[i], arr3[i] <= 2000
21-
* */
226
publicclass_1213 {
237
publicstaticclassSolution1 {
24-
/**credit: https://leetcode.com/problems/intersection-of-three-sorted-arrays/discuss/397603/Simple-Java-solution-beats-100*/
8+
/**
9+
* credit: https://leetcode.com/problems/intersection-of-three-sorted-arrays/discuss/397603/Simple-Java-solution-beats-100
10+
*/
2511
publicList<Integer>arraysIntersection(int[]arr1,int[]arr2,int[]arr3) {
2612
List<Integer>result =newArrayList();
2713
inti =0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp