Facebook | Phone | Compare Linked Lists

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-10-28Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Compare strings stored in two Linked Lists. Return true if the strings stored in both the lists are similar.

List 1 : "He" -> " llo" -> "wor" -> "ld"
List 2 : "H" --> "e" --> "ll" --> "owo" --> "r" --> "ld"

Both the lists store "helloworld". Interviewer was looking for more optimal algorithm.

Comments