def longestCommonPrefix(self, strs):
        # checking, otherwise: ValueError: min() arg is an empty sequence
        if not strs:
            return ""

        n = len(strs)

        str_builder = ""
        min_len = min(len(string) for string in strs)
        for i in range(min_len):
            char = strs[0][i]

            j = 0
            while j<n:
                try:
                    if strs[j][i]!=char: break
                    j += 1
                except IndexError:
                    break

            if j==n:
                str_builder += char
            else:
                break

        return str_builder
O(k*n)
dataset/ETHPy150Open algorhythms/LeetCode/015 Longest Common Prefix.py/Solution.longestCommonPrefix