Skip to content

Commit f154fff

Browse files
refactor 1213
1 parent 930b934 commit f154fff

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
import java.util.ArrayList;
44
import java.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
public class _1213 {
237
public static class Solution1 {
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
public List<Integer> arraysIntersection(int[] arr1, int[] arr2, int[] arr3) {
2612
List<Integer> result = new ArrayList();
2713
int i = 0;

0 commit comments

Comments
 (0)