Zscaler Interview Question

Networking concept and coding. Finding longest matching string in the given two strings.