you give stre s you build new string p s follow operation time choose subsequence s_i_1 s_i_2 dot s_i_k 1 le i_1 i_2 dot i_k le s erase choose subsequence s s concatenate choose subsequence right string p word p p s_i_1s_i_2dot s_i_k of course initially stre p for example let s textababcd at let choose subsequence s_1 s_4 s_5 textabc s textbad p textabc at second let choose s_1 s_2 textba s textd p textabcba so build textabcba textababcdCan build give string t algorithm