Workday interview question

String questions (Dynamic programing & backtracking concept)