Given any two lists A and B, determine if:
A is equal to list B; orA contains list B (A is a superlist of B); orA is contained by list B (A is a sublist of B); orA and B are unequalSpecifically, list A is equal to list B if both lists have the same values in the same order.
List A is a superlist of B if A contains a contiguous sub-sequence of values equal to B.
List A is a sublist of B if B contains a contiguous sub-sequence of values equal to A.
Examples:
A = [] and B = [] (both lists are empty), then A and B are equalA = [1, 2, 3] and B = [], then A is a superlist of BA = [] and B = [1, 2, 3], then A is a sublist of BA = [1, 2, 3] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [3, 4, 5] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [3, 4] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [1, 2, 3] and B = [1, 2, 3], then A and B are equalA = [1, 2, 3, 4, 5] and B = [2, 3, 4], then A is a superlist of BA = [1, 2, 4] and B = [1, 2, 3, 4, 5], then A and B are unequalA = [1, 2, 3] and B = [1, 3, 2], then A and B are unequalGiven any two lists A and B, determine if:
A is equal to list B; orA contains list B (A is a superlist of B); orA is contained by list B (A is a sublist of B); orA and B are unequalSpecifically, list A is equal to list B if both lists have the same values in the same order.
List A is a superlist of B if A contains a contiguous sub-sequence of values equal to B.
List A is a sublist of B if B contains a contiguous sub-sequence of values equal to A.
Examples:
A = [] and B = [] (both lists are empty), then A and B are equalA = [1, 2, 3] and B = [], then A is a superlist of BA = [] and B = [1, 2, 3], then A is a sublist of BA = [1, 2, 3] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [3, 4, 5] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [3, 4] and B = [1, 2, 3, 4, 5], then A is a sublist of BA = [1, 2, 3] and B = [1, 2, 3], then A and B are equalA = [1, 2, 3, 4, 5] and B = [2, 3, 4], then A is a superlist of BA = [1, 2, 4] and B = [1, 2, 3, 4, 5], then A and B are unequalA = [1, 2, 3] and B = [1, 3, 2], then A and B are unequal