@@ -0,0 +1,1179 @@
+package leetcode;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport java.util.SortedSet;%0Aimport java.util.TreeSet;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.IntStream;%0A%0Apublic class Task1268 %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(new Task1268().suggestedProducts(new String%5B%5D%7B%22mobile%22, %22mouse%22, %22moneypot%22, %22monitor%22, %22mousepad%22%7D, %22mouse%22));%0A        System.out.println(new Task1268().suggestedProducts(new String%5B%5D%7B%22havana%22%7D, %22havana%22));%0A        System.out.println(new Task1268().suggestedProducts(new String%5B%5D%7B%22bags%22, %22baggage%22, %22banner%22, %22box%22, %22cloths%22%7D, %22bags%22));%0A    %7D%0A%0A    public List%3CList%3CString%3E%3E suggestedProducts(String%5B%5D products, String searchWord) %7B%0A        SortedSet%3CString%3E sortedProducts = new TreeSet%3C%3E(Arrays.asList(products));%0A        return IntStream.range(0, searchWord.length())%0A                .mapToObj(i -%3E sortedProducts.subSet(searchWord.substring(0, i + 1), searchWord.substring(0, i + 1) + Character.MAX_VALUE)%0A                        .stream()%0A                        .limit(3)%0A                        .collect(Collectors.toList()))%0A                .collect(Collectors.toList());%0A    %7D%0A%0A%7D%0A

Add task 1268