摘要: Read an input text from the console and print the number of words. By word we mean a sequence of characters separated by one or several spaces. If the 阅读全文
posted @ 2020-08-23 18:13 longlong6296 阅读(143) 评论(0) 推荐(0)
摘要: Imagine that we have a typing machine that accepts only one letter at a time for writing, but we want to write an array of words instead. public class 阅读全文
posted @ 2020-08-23 13:06 longlong6296 阅读(102) 评论(0) 推荐(0)
摘要: Write a program searching for passwords in a given text. It is known that: a password consists of digits and Latin upper- and lowercase letters; a pas 阅读全文
posted @ 2020-08-22 18:00 longlong6296 阅读(215) 评论(0) 推荐(0)
摘要: For a given string you should remove all HTML tags from it. An HTML tag starts with the symbol "<" and ends with the symbol ">". You should output the 阅读全文
posted @ 2020-08-22 12:25 longlong6296 阅读(95) 评论(0) 推荐(0)
摘要: The first line of the input contains a sequence of letters. The second line of the input contains some text. Your task is to determine if any of these 阅读全文
posted @ 2020-08-21 13:24 longlong6296 阅读(165) 评论(0) 推荐(0)
摘要: An IP address consists of four numbers from 0 to 255, inclusive, divided by the dots. For example, 127.0.0.1 is a valid IP address, but 256.0.0.1 and 阅读全文
posted @ 2020-08-21 11:38 longlong6296 阅读(132) 评论(0) 推荐(0)
摘要: Earlier, we defined edit distance as the minimal number of insertions, deletions and substitutions required to transform one string into another. But 阅读全文
posted @ 2020-08-18 07:52 longlong6296 阅读(219) 评论(0) 推荐(0)
摘要: Write a program that reads several descending sorted sequences of ints and merges them into one sequence. The merged sequence should be also sorted in 阅读全文
posted @ 2020-08-17 08:04 longlong6296 阅读(215) 评论(0) 推荐(0)
摘要: Implement a method to find the second largest number in an array of ints. If the input array is empty or contains only a single number, the method mus 阅读全文
posted @ 2020-08-16 11:36 longlong6296 阅读(126) 评论(0) 推荐(0)
摘要: Implement a method that finds the index of the K-th element equal to the minimum in an array of ints. If no such element can be found, return -1. The 阅读全文
posted @ 2020-08-16 11:05 longlong6296 阅读(104) 评论(0) 推荐(0)