Next word list

Write a function @next_word_list(w, f)@ that given a nonempty string ww and a list of strings ff, returns the list formed by the strings in ff that appear just after each ocurrence of ww in ff. The order of appearance of the words in the resulting lists must preserve the original order.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T17:30:27.530Z

© Jutge.org, 2006–2026.
https://jutge.org