-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (27 loc) · 824 Bytes
/
main.cpp
File metadata and controls
33 lines (27 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include "Trie.h"
using namespace std;
int main() {
Trie trie;
trie.add("hello");
trie.add("goodbye");
trie.add("congratulation");
trie.add("congratulations");
trie.add("me");
trie.add("that");
trie.add("apple");
trie.add("ths");
cout << trie.isExisted("this") << endl;
cout << trie.isExisted("those") << endl;
cout << trie.isExisted("hello") << endl;
cout << trie.isExisted("hellooo") << endl;
cout << endl;
cout << trie.isExisted("goodbye") << endl;
cout << trie.isExisted("hello") << endl;
cout << trie.isExisted("ths") << endl;
cout << trie.isExisted("that") << endl;
cout << trie.isExisted("me") << endl;
cout << trie.isExisted("apple") << endl;
cout << trie.isExisted("congrtultion") << endl;
return 0;
}