how can i check if a string contains determinate sequence from last element to first?
Example:
I have this sequence:
A, C, C, A, B, C
If sequence contains C [index:5], B[index:4], A[index:3]
return true.
In this example the expected out is true
I have this sequence:
P, R, P, R, R
If sequence contains P [index:5], R[index:4], P[index:3]
return true.
In this example the expected out is false