Your task is to duplicate all short words (that is, words with at most 3 characters) in a linked list. For example, you should transform the linked list with the elements

Mary, had, a, little, lamb


Mary, had, had, a, a, little, lamb

Complete the following file:

import java.util.Arrays; import java.util.LinkedList; import java.util.ListIterator; public class WordList { public void duplicateShortWords(LinkedList<String> words) { // TODO: Complete method } public boolean isShortWord(String word) { return word.length() <= 3; } // this method is used to check your work public LinkedList<String> check(String[] elements) { LinkedList<String> words = new LinkedList<String>(); words.addAll(Arrays.asList(elements)); duplicateShortWords(words); return words; } }