Shortest Substring with Prefix and Suffix

Company: Arista

Difficulty: medium