vJechsmayr / PythonAlgorithms

All Algorithms implemented in Python 3 a project for hacktoberfest2020 - NO Issues or PRs for hacktoberfest 2021
MIT License
132 stars 367 forks source link

0599 - Minimum Index Sum of Two Lists #800

Closed chw9 closed 4 years ago

chw9 commented 4 years ago

Description of the Problem

Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings.

You need to help them find out their common interest with the least list index sum. If there is a choice tie between answers, output all of them with no order requirement. You could assume there always exists an answer.

Code

class Solution(object):
    def findRestaurant(self, list1, list2):
        """
        :type list1: List[str]
        :type list2: List[str]
        :rtype: List[str]
        """

Link To The LeetCode Problem

LeetCode

chw9 commented 4 years ago

Please assign me to this issue

vJechsmayr commented 4 years ago

@chw9 Waiting for your PR 😸