79745454

Date: 2025-08-25 07:48:16
Score: 0.5
Natty:
Report link

The simpliest way, i believe is to do something like this:

from itertools import takewhile

def find_lcp(s: List[str]) -> str:
    t = len(list(takewhile(lambda x: len(x)==1, map(set,zip(*s)))))
    return s[0][:t]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: strawdog