Quick Overview

Compare both suffix-to-prefix concatenation orders, merge the longest edge overlap, and favor the original string order when overlap lengths tie.

Merge Two Strings Using the Longest Edge Overlap

Company: Apple

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Online Assessment

Overview: Compare both suffix-to-prefix concatenation orders, merge the longest edge overlap, and favor the original string order when overlap lengths tie.

Loading…