Skip to content

Commit 332205d

Browse files
refactor 599
1 parent 05a1373 commit 332205d

File tree

1 file changed

+0
-28
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-28
lines changed

src/main/java/com/fishercoder/solutions/_599.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,6 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
/**
9-
* 599. Minimum Index Sum of Two Lists
10-
*
11-
Suppose Andy and Doris want to choose a restaurant for dinner,
12-
and they both have a list of favorite restaurants represented by strings.
13-
You need to help them find out their common interest with the least list index sum.
14-
If there is a choice tie between answers, output all of them with no order requirement. You could assume there always exists an answer.
15-
16-
Example 1:
17-
Input:
18-
["Shogun", "Tapioca Express", "Burger King", "KFC"]
19-
["Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"]
20-
Output: ["Shogun"]
21-
Explanation: The only restaurant they both like is "Shogun".
22-
23-
Example 2:
24-
Input:
25-
["Shogun", "Tapioca Express", "Burger King", "KFC"]
26-
["KFC", "Shogun", "Burger King"]
27-
Output: ["Shogun"]
28-
Explanation: The restaurant they both like and have the least index sum is "Shogun" with index sum 1 (0+1).
29-
30-
Note:
31-
The length of both lists will be in the range of [1, 1000].
32-
The length of strings in both lists will be in the range of [1, 30].
33-
The index is starting from 0 to the list length minus 1.
34-
No duplicates in both lists.
35-
*/
368
public class _599 {
379
public static class Solution1 {
3810
public String[] findRestaurant(String[] list1, String[] list2) {

0 commit comments

Comments
 (0)