📄 design.txt
字号:
first of all, create a new Tokenizer, which will prompt to input a sentence, then call the nextWord function of it to get each word in the sentence, save them to list1. to count and output the number of words in list1, just output the size of list1. secondly, construct a loop to check every word in list1, find out those begin with a consonant, delete from list1 and add into list2.
output size of list2. thirdly, insert each word of list2 to a BinarySearchTree, with the word as the key, the times of word appeared in the list as the element. if there are same word, just insert once, and record the times of the word appeared in the node. then, traverse the tree, output the keys and the elements of the tree. the number of different word is the size of the search tree.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -