Simple Logic interview question

Pattern identification of string and algos.