Amazon Interview Question

Compare versions in the two strings.