So I have list A and list B.
A is of size n and B is of size n + 1.
I need to know if all elements in A are the same as all elements in B.sublist(0, n - 1).
A: [5,7,2,9]
B: [5,7,2,9,1]
true
A: [5,7,2,9]
B: [5,7,2,9,9]
true
A: [7,5,2,9]
B: [5,7,2,9,1]
false (order matters)
Is there any elegant ways to do this using library functions maybe?