this is a question to find the closest kth element
String check (DP question)

check if a String can be comprised by two other string